User Tools

Site Tools


ssh

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ssh [2017/05/19 20:42]
deul [Copy public key to server]
ssh [2019/05/06 09:16]
jansen remove references to authorized_keys2, add section for local use with shared home directory
Line 55: Line 55:
  
 The file identity.pub contains your public key, which can be added to other system'​s authorized keys files. The file identity.pub contains your public key, which can be added to other system'​s authorized keys files.
 +
 +====Simplified version in case of a shared home disk====
 +This is how you authorize the key for use within a local network with shared home disk. See below for the general case of accessing a remote system.
 +
 +Simply add the public part of the key to your .ssh/​authorized_keys file, and make sure that that file is not accessible for others:
 +  cat ~/​.ssh/​id_dsa.pub >> ~/​.ssh/​authorized_keys
 +  chmod 600 ~/​.ssh/​authorized_keys
 +
  
 ====Copy public key to server==== ====Copy public key to server====
Line 66: Line 74:
   id_dsa.pub ​   100% |*****************************************************| ​  ​526 ​      00:00   id_dsa.pub ​   100% |*****************************************************| ​  ​526 ​      00:00
  
-This will place your keys in your home directory on the remote server. After that we will login on the remote server using ssh or telnet ​the conventional way... with a password.+This will place your keys in your home directory on the remote server. After that we will login on the remote server using ssh the conventional way... with a password.
  
-When you are logged in you should create a .ssh directory, and inside the .ssh/ directory create an authorized_keys ​and an authorized_keys2 ​file and add the keys to the files. Make sure the files are not readable for other users/​groups. chmod 600 authorized_keysdoes the trick.+When you are logged in you should create a .ssh directory, and inside the .ssh/ directory create an authorized_keys file and add the keys to the file. Make sure the files are not readable for other users/​groups. chmod 600 authorized_keys does the trick.
  
-Placing the key for version 2 works as follows:+Placing the key works as follows:
  
   $ cd .ssh   $ cd .ssh
-  $ touch authorized_keys2 +  $ touch authorized_keys 
-  $ chmod 600 authorized_keys2 +  $ chmod 600 authorized_keys 
-  $ cat ../​id_dsa.pub >> ​authorized_keys2+  $ cat ../​id_dsa.pub >> ​authorized_keys
   $ rm ../​id_dsa.pub   $ rm ../​id_dsa.pub
  
 From now on you can login from client yyyy to server zzzz without having to specify a password. From now on you can login from client yyyy to server zzzz without having to specify a password.
  
-====== SFTP and SCP file access ====== 
ssh.txt · Last modified: 2019/05/06 09:16 by jansen