This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
ssh [2017/05/19 20:42] – [Copy public key to server] deul | ssh [2019/05/06 09:16] – remove references to authorized_keys2, add section for local use with shared home directory jansen | ||
---|---|---|---|
Line 55: | Line 55: | ||
The file identity.pub contains your public key, which can be added to other system' | The file identity.pub contains your public key, which can be added to other system' | ||
+ | |||
+ | ====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/ | ||
+ | cat ~/ | ||
+ | chmod 600 ~/ | ||
+ | |||
====Copy public key to server==== | ====Copy public key to server==== | ||
Line 66: | Line 74: | ||
id_dsa.pub | id_dsa.pub | ||
- | 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 | + | 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 | + | 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/ |
- | 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 ../ | + | $ cat ../ |
$ rm ../ | $ rm ../ | ||
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 ====== |