User Tools

Site Tools


tutorials:remote_access

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:remote_access [2017/09/14 21:35] – [Key] chkuotutorials:remote_access [2019/01/11 17:35] (current) – [Key] chkuo
Line 18: Line 18:
  
 ==== Key ==== ==== Key ====
-To generate key-pairs, use: <code bash>ssh-keygen -t 'rsa'</code> +To generate key-pairs, use: <code bash>ssh-keygen -t rsa -b 4096</code>
  
-This command will create a pair of private key (''~/.ssh/id_rsa'') and public key (''~/.ssh/id_rsa.pub''). To enable authentication on a remote host, append the public key to the ''~/.ssh/authorized_keys'' file in the remote host.+This command will create a pair of private key (''~/.ssh/id_rsa'') and public key (''~/.ssh/id_rsa.pub''). To enable authentication on a remote host, append the public key to the ''~/.ssh/authorized_keys'' file in the remote host (this file should be owned by the user and have the ''644'' permissions).
  
 If the home directory is encrypted, ''authorized_keys'' would not work while within the home directory before the user is logged in. Move the ''authorized_keys'' file and modify ''/etc/ssh/sshd_config'' accordingly. If the home directory is encrypted, ''authorized_keys'' would not work while within the home directory before the user is logged in. Move the ''authorized_keys'' file and modify ''/etc/ssh/sshd_config'' accordingly.
tutorials/remote_access.1505396100.txt.gz · Last modified: by chkuo