Changes between Version 1 and Version 2 of SSHKEYGEN


Ignore:
Timestamp:
05/26/21 02:39:47 (4 years ago)
Author:
krit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SSHKEYGEN

    v1 v2  
    11= SSH KEY GEN =
     2
     3
     41. Create ssh key at localhost
     5{{{
     6ssh-keygen -t rsa -b 4096 -C user@remotehost.com
     7}}}
     8Then they will ask to enter default .ssh path
     9{{{
     10Enter file in which to save the key (/home/yourusername/.ssh/id_rsa):
     11}}}
     12We can key in any passphrase to make extra security but just press enter with empty key it will automate gen-key for you
     13{{{
     14Enter passphrase (empty for no passphrase):
     15}}}
     16Now the public and private key will be kept in
     17{{{
     18ls -al
     19/home/yourusername/.ssh/id_rsa /home/yourusername/.ssh/id_rsa.pub
     20}}}
     21
     222. In your local host copy public key (id_rsa.pub) to remote host
     23{{{
     24ssh-copy-id remote_username@server_ip_address
     25}}}
     26or with manual ssh with
     27{{{
     28cat ~/.ssh/id_rsa.pub | ssh remote_username@server_ip_address "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
     29}}}
     30
     313. Now you can ssh with out prompt for password
     32