Generating RSA private key, 2048 bit long modulus



jack@jack-desktop:~$ openssl genrsa -out key.pem
Generating RSA private key, 2048 bit long modulus
.........+++
...........................+++
e is 65537 (0x10001)
jack@jack-desktop:~$ openssl req -new -key key.pem -out csr.pem
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:PH
State or Province Name (full name) [Some-State]:Bulacan
Locality Name (eg, city) []:Gaya Gaya
Organization Name (eg, company) [Internet Widgits Pty Ltd]:BlogBlocksOrg
Organizational Unit Name (eg, section) []:Nodejs
Common Name (e.g. server FQDN or YOUR name) []:Jack Northrup
Email Address []:jack@yahoo.com

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: XXXXX
An optional company name []:BlogBlocksOrg
jack@jack-desktop:~$ openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
Signature ok
subject=/C=PH/ST=Bulacan/L=Gaya Gaya/O=BlogBlocksOrg/OU=Nodejs/CN=Jack Northrup/emailAddress=jack@yahoo.com
Getting Private key


#!/bin/bash

docker run --rm --name image-processing -v /home/jack/key.pem:/key.pem -d -p 443:8888 -e "PASSWORD=password" -v /home/jack/Desktop/Ubuntu16.04/notebooks:/notebooks jacknorthrup/darkroom:latest  tail -f /dev/null

docker run --rm --name start-stuff -v /home/jack/Desktop/Ubuntu16.04/notebooks:/notebooks -d jacknorthrup/darkroom:latest /bin/bash -c "cd /notebooks && ./notebook2.sh"


#!/bin/bash
#
# Start the docker container which will keep looking for images inside
# the inputs/ directory and spew out results into outputs/


docker run --name darkroom-stuff -d -p 8888:8888 -e "PASSWORD=password" -v /notebooks/STUFF:/notebooks/STUFF jacknorthrup/darkroom:latest
#docker run --name=jacks-notebook --rm -d -p 8888:8888 -e "PASSWORD=MakeAPassword" :/notebooks -e "USE_HTTP=1" 74ca5b9a6129:co
sleep 2
docker run --name start-stuff -v `pwd`/notebooks/STUFF:/notebooks/STUFF -d jacknorthrup/darkroom:latest /bin/bash -c "cd /src && ./notebook.sh"



if [ "`sudo docker ps | grep darkroom-stuff`" = "" ]; then
    echo "Making volume"
    sudo docker run -t -i --rm --name darkroom-inside -v `pwd`/notebooks/STUFF:/notebooks/STUFF jacknorthrup/darkroom:latest /bin/bash
else
    echo "Steaming volume from darkroom-stuff"
    sudo docker run -t -i --name darkroom-inside --volumes-from=darkroom-stuff jacknorthrup/darkroom:latest /bin/bash
fi

Bash Stuff


#docker run --name jdeepdream-json --volumes-from jdeepdream-compute -d ubuntu:14.04 /bin/bash -c "cd /opt/deepdream && ./
#docker stop $(docker ps -aq)
#docker rm $(docker ps -aq)

sudo docker run --name image-processing -v /home/jack/key.pem:/key.pem -d -p 8888:8888 -e "PASSWORD=password" -v /notebooks:/notebooks jacknorthrup/darkroom:latest  tail -f /dev/null

sudo docker run --name start-stuff -v `pwd`/notebooks/STUFF:/notebooks/STUFF -d jacknorthrup/darkroom:latest /bin/bash -c "cd /src && ./notebook.sh"

sudo docker run -t -i --name darkroom-inside --volumes-from=darkroom-stuff jacknorthrup/darkroom:latest /bin/bash

BASH STUFF
root@72efce76df14:/# jupyter notebook -h
The Jupyter HTML Notebook.

This launches a Tornado based HTML Notebook Server that serves up an
HTML5/Javascript Notebook client.

Subcommands
-----------

Subcommands are launched as `jupyter-notebook cmd [args]`. For information on
using subcommand 'cmd', do: `jupyter-notebook cmd -h`.

password
    Set a password for the notebook server.
list
    List currently running notebook servers.

Options
-------

Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '--help-all'.

--script
    DEPRECATED, IGNORED
--pylab
    DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
--debug
    set log level to logging.DEBUG (maximize logging output)
--no-browser
    Don't open the notebook in a browser after startup.
--allow-root
    Allow the notebook to be run from root user.
-y
    Answer yes to any questions instead of prompting.
--no-mathjax
    Disable MathJax
    
    MathJax is the javascript library Jupyter uses to render math/LaTeX. It is
    very large, so you may want to disable it if you have a slow internet
    connection, or for offline use of the notebook.
    
    When disabled, equations etc. will appear as their untransformed TeX source.
--no-script
    DEPRECATED, IGNORED
--generate-config
    generate default config file
--certfile= (NotebookApp.certfile)
    Default: u''
    The full path to an SSL/TLS certificate file.
--ip= (NotebookApp.ip)
    Default: 'localhost'
    The IP address the notebook server will listen on.
--pylab= (NotebookApp.pylab)
    Default: 'disabled'
    DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
--log-level= (Application.log_level)
    Default: 30
    Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')
    Set the log level by value or name.
--port-retries= (NotebookApp.port_retries)
    Default: 50
    The number of additional ports to try if the specified port is not
    available.
--notebook-dir= (NotebookApp.notebook_dir)
    Default: u''
    The directory to use for notebooks and kernels.
--keyfile= (NotebookApp.keyfile)
    Default: u''
    The full path to a private key file for usage with SSL/TLS.
--client-ca= (NotebookApp.client_ca)
    Default: u''
    The full path to a certificate authority certificate for SSL/TLS client
    authentication.
--config= (JupyterApp.config_file)
    Default: u''
    Full path of a config file.
--port= (NotebookApp.port)
    Default: 8888
    The port the notebook server will listen on.
--transport= (KernelManager.transport)
    Default: 'tcp'
    Choices: [u'tcp', u'ipc']
--browser= (NotebookApp.browser)
    Default: u''
    Specify what command to use to invoke a web browser when opening the
    notebook. If not specified, the default browser will be determined by the
    `webbrowser` standard library module, which allows setting of the BROWSER
    environment variable to override it.

To see all available configurables, use `--help-all`

Examples
--------

    jupyter notebook                       # start the notebook
    jupyter notebook --certfile=mycert.pem # use SSL/TLS certificate
    jupyter notebook password              # enter a password to protect the server

root@72efce76df14:/# locate mycert.pem
locate: warning: database '/var/cache/locate/locatedb' is more than 8 days old (actual age is 506.2 days)
root@72efce76df14:/# openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem
Generating a 2048 bit RSA private key
................................................+++
......................................................+++
writing new private key to 'key.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:ph
State or Province Name (full name) [Some-State]:gayagaya
Locality Name (eg, city) []:sanjose
Organization Name (eg, company) [Internet Widgits Pty Ltd]:bb org
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:jack
Email Address []:
root@72efce76df14:/# 
root@72efce76df14:/# ls
bin   build            dev  home     lib    media  notebooks  proc  run   scripts  sys  usr
boot  certificate.pem  etc  key.pem  lib64  mnt    opt        root  sbin  srv      tmp  var
root@72efce76df14:/# openssl x509 -text -noout -in certificate.pem
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 14024939906409766469 (0xc2a298899dc11e45)
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=ph, ST=gayagaya, L=sanjose, O=bb org, CN=jack
        Validity
            Not Before: Sep 29 03:09:54 2018 GMT
            Not After : Sep 29 03:09:54 2019 GMT
        Subject: C=ph, ST=gayagaya, L=sanjose, O=bb org, CN=jack
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    
                    70:77
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Key Identifier: 
                F0:AF:13:47:B5:F5:76:CE:1F:FD:AD:99:56:D4:AF:A0:F4:2D:98:CE
            X509v3 Authority Key Identifier: 
                keyid:F0:AF:13:47:B5:F5:76:CE:1F:FD:AD:99:56:D4:AF:A0:F4:2D:98:CE

            X509v3 Basic Constraints: 
                CA:TRUE
    Signature Algorithm: sha256WithRSAEncryption
         
         c9:4d:5f:93
root@72efce76df14:/# openssl pkcs12 -inkey key.pem -in certificate.pem -export -out certificate.p12
Enter Export Password:
Verifying - Enter Export Password:
root@72efce76df14:/# openssl pkcs12 -in certificate.p12 -noout -info
Enter Import Password:
MAC Iteration 2048
MAC verified OK
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048
Certificate bag
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
root@72efce76df14:/# ls             
bin   build            certificate.pem  etc   key.pem  lib64  mnt        opt   root  sbin     srv  tmp  var
boot  certificate.p12  dev              home  lib      media  notebooks  proc  run   scripts  sys  usr
root@72efce76df14:/# jupyter notebook -h
The Jupyter HTML Notebook.

This launches a Tornado based HTML Notebook Server that serves up an
HTML5/Javascript Notebook client.

Subcommands
-----------

Subcommands are launched as `jupyter-notebook cmd [args]`. For information on
using subcommand 'cmd', do: `jupyter-notebook cmd -h`.

password
    Set a password for the notebook server.
list
    List currently running notebook servers.

Options
-------

Arguments that take values are actually convenience aliases to full
Configurables, whose aliases are listed on the help line. For more information
on full configurables, see '--help-all'.

--script
    DEPRECATED, IGNORED
--pylab
    DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
--debug
    set log level to logging.DEBUG (maximize logging output)
--no-browser
    Don't open the notebook in a browser after startup.
--allow-root
    Allow the notebook to be run from root user.
-y
    Answer yes to any questions instead of prompting.
--no-mathjax
    Disable MathJax
    
    MathJax is the javascript library Jupyter uses to render math/LaTeX. It is
    very large, so you may want to disable it if you have a slow internet
    connection, or for offline use of the notebook.
    
    When disabled, equations etc. will appear as their untransformed TeX source.
--no-script
    DEPRECATED, IGNORED
--generate-config
    generate default config file
--certfile= (NotebookApp.certfile)
    Default: u''
    The full path to an SSL/TLS certificate file.
--ip= (NotebookApp.ip)
    Default: 'localhost'
    The IP address the notebook server will listen on.
--pylab= (NotebookApp.pylab)
    Default: 'disabled'
    DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.
--log-level= (Application.log_level)
    Default: 30
    Choices: (0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')
    Set the log level by value or name.
--port-retries= (NotebookApp.port_retries)
    Default: 50
    The number of additional ports to try if the specified port is not
    available.
--notebook-dir= (NotebookApp.notebook_dir)
    Default: u''
    The directory to use for notebooks and kernels.
--keyfile= (NotebookApp.keyfile)
    Default: u''
    The full path to a private key file for usage with SSL/TLS.
--client-ca= (NotebookApp.client_ca)
    Default: u''
    The full path to a certificate authority certificate for SSL/TLS client
    authentication.
--config= (JupyterApp.config_file)
    Default: u''
    Full path of a config file.
--port= (NotebookApp.port)
    Default: 8888
    The port the notebook server will listen on.
--transport= (KernelManager.transport)
    Default: 'tcp'
    Choices: [u'tcp', u'ipc']
--browser= (NotebookApp.browser)
    Default: u''
    Specify what command to use to invoke a web browser when opening the
    notebook. If not specified, the default browser will be determined by the
    `webbrowser` standard library module, which allows setting of the BROWSER
    environment variable to override it.

To see all available configurables, use `--help-all`

Examples
--------

    jupyter notebook                       # start the notebook
    jupyter notebook --certfile=mycert.pem # use SSL/TLS certificate
    jupyter notebook password              # enter a password to protect the server

root@72efce76df14:/# jupyter notebook --certfile=certificate.pem