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
Last revision Both sides next revision
ssh [2017/05/19 20:38]
deul [SSH keys]
ssh [2017/05/19 20:42]
deul
Line 22: Line 22:
 --------- ---------
  
-====== SSH shell access ​======+====== SSH tunnels ​====== 
 +For the Mac and Linux commandline ssh client, setting up a tunnel is usually a matter of using the option \\ 
 +''​%%-L local_port:​remote_machine:​remote_port%%'',​ e.g. ''​%%-L 3389:​windows machine:​3389%%''​ \\ 
 +for forwarding a Windows remote desktop. More detail can be found in the [[vnc|vnc ssh tuning pages]]. 
 + 
 +See [[linux:​putty]] for instructions about setting up a tunnel with ''​%%putty%%''​ (Windows, linux ssh client). 
 +====== SSH client software ====== 
 +Linux and macOS come with a commandline client for ssh. 
 +For Windows, the recommended client is [[linux:​putty]] 
 ====== SSH keys ====== ====== SSH keys ======
 ====Create a key pair==== ====Create a key pair====
Line 57: Line 66:
   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.
  
-====== SFTP and SCP file access ====== +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_keys* does the trick. 
-====== SSH tunnels ====== + 
-For the Mac and Linux commandline ​ssh client, setting up a tunnel is usually a matter of using the option \\ +Placing ​the key for version 2 works as follows: 
-''​%%-L local_port:​remote_machine:​remote_port%%'',​ e.g''​%%-L 3389:​windows machine:​3389%%''​ \\ + 
-for forwarding a Windows remote desktopMore detail ​can be found in the [[vnc|vnc ssh tuning pages]].+  $ cd .ssh 
 +  $ touch authorized_keys2 
 +  $ chmod 600 authorized_keys2 
 +  $ cat ../id_dsa.pub >> authorized_keys2 
 +  $ rm ../​id_dsa.pub 
 + 
 +From now on you can login from client yyyy to server zzzz without having to specify a password.
  
-See [[linux:​putty]] for instructions about setting up a tunnel with ''​%%putty%%''​ (Windows, linux ssh client). 
-====== SSH client software ====== 
-Linux and macOS come with a commandline client for ssh. 
-For Windows, the recommended client is [[linux:​putty]] 
ssh.txt · Last modified: 2019/05/06 09:16 by jansen