SmtC: Show me the Code
Ole Peter Smith
Instituto de Matemática e Estatística
Universidade Federal de Goiás
http://www.olesmith.com.br

Backup Script
Quando Pedro me fala sobre Paulo
Sei mais do Pedro do que do Paulo
Sigmund Freud

SSH: Gods Gift to Humanity...

SSH - SCP - SFTP

  • Password vs key
  • Create the key:
    
                    ole@gauss$ ssh-keygen
                    Generating public/private rsa key pair.
                    Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/id_rsa.test
                    Enter passphrase (empty for no passphrase): 
                    Enter same passphrase again: 
                    Your identification has been saved in /root/.ssh/id_rsa.test.
                    Your public key has been saved in /root/.ssh/id_rsa.test.pub.
                    The key fingerprint is:
                    SHA256:mMSAWNNZQnEGYbfW+KHDKV6e9R516TNRjSk/Nb5F7KQ root@gauss
                    The key's randomart image is:
                    +---[RSA 2048]----+
                    | oo+O*=          |
                    |. .ooB +       +.|
                    |      * o   . o.B|
                    |     + * .   o.O.|
                    |    . O S   . E.o|
                    |   . + + . . o oo|
                    |    . o   o   +. |
                    |         . .   o |
                    |          .      |
                    +----[SHA256]-----+
                    ole@gauss$
                         
  • DO NOT CREATE KEY FOR ROOT!!! - unless you have to...
  • Copy the key
  • root@gauss$ ssh-copy-id -i ~/.ssh//root/.ssh/id_rsa.test user@host
Messages:
0 secs.