User Tools

Site Tools


wiki:advanced:authentication:passwordless-ssh

Differences

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

Link to this comparison view

wiki:advanced:authentication:passwordless-ssh [2011/11/15 04:41]
sunweaver wiki:authentication:passwordless-ssh renamed to wiki:advanced:authentication:passwordless-ssh (Namespace cleanup)
wiki:advanced:authentication:passwordless-ssh [2013/03/08 13:31]
Line 1: Line 1:
-====== Passwordless authentication using ssh-keys ​ ====== 
- 
-===== Linux client ===== 
- 
-You'll need to generate a SSH key via the ssh-keygen command. Please choose which key you want to generate (we recommend dsa): 
- 
-<​code>​ 
-$ ssh-keygen -t rsa''​ 
-</​code>​ 
- 
-or 
- 
-<​code>​ 
-$ ssh-keygen -t dsa 
-</​code>​ 
- 
-This will create following files inside your $HOME/.ssh/ directory: 
- 
-<​file>​ 
-~/​.ssh/​id_{rsa,​dsa} 
-~/​.ssh/​id_{rsa,​dsa}.pub 
-</​file>​ 
- 
-You'll need to transfer the public part of the key to the wanted server. You can do this using the ssh-copy-id command: ​ 
- 
-<​code>​ 
-$ ssh-copy-id -i ~/​.ssh/​id_rsa.pub user@remote-system 
-</​code>​ 
- 
-or 
- 
-<​code>​ 
-$ ssh-copy-id -i /​.ssh/​id_dsa.pub user@remote-system 
-</​code>​ 
- 
-After the transfer you can add the path to the private part of the key to the session preferences inside x2goclient. x2goclient should now establish the connection without asking for a password by simply clicking on the session card view.  
- 
-===== Windows client ===== 
- 
-Start a command prompt and navigate to the x2goclient folder, in this example it is **C:​\Program Files\x2goclient**. 
- 
-First we generate a DSA key pair (use an empty password phrase if you want SSO): 
-<code dos> 
-C:\Program Files\x2goclient>​ssh-keygen.exe -t dsa 
-</​code>​ 
- 
-:!: ssh-keygen.exe prints the path to the key file(s), you will need that in the next step. 
- 
-You'll need to transfer the public key file to the wanted server. You can do this using the scp.exe command with the path that ssh-keygen.exe printed (make sure you transfer the id_dsa**.pub** file): 
- 
-<code dos> 
-C:\Program Files\x2goclient>​scp.exe /​cygdrive/​C/​DOCUME~1/<​username>/​.x2go/​.ssh/​id_dsa.pub username@remoteserver:​ 
-</​code>​ 
- 
-When the file has been transferred,​ log on to the remote server with ssh.exe: 
-<code dos> 
-C:\Program Files\x2goclient>​ssh.exe username@remoteserver 
-</​code>​ 
- 
-Go to your .ssh folder, add the contents of the public key file to your authorized_keys file and then remove the public key file: 
-<code bash> 
-cd ~/.ssh 
-cat ~/​id_dsa.pub >> authorized_keys 
-rm ~/​id_dsa.pub 
-</​code>​ 
- 
-You can now add the path to the id_dsa file (the private part of the key) to the session preferences inside x2goclient. x2goclient should now establish the connection without asking for a password by simply clicking on the session card view.  
- 
-You can also create a desktop shortcut which starts the session with the client window hidden; in x2goclient select Session -> "​Create session icon on desktop..."​ -> select session from the list and click the "​Create session icon on desktop..."​-button. 
- 
-:!: The path to x2goclient.exe in the shortcut may be wrong, edit the shortcut and remove "​bin\"​ from the path and the working directory. 
  
wiki/advanced/authentication/passwordless-ssh.txt ยท Last modified: 2013/03/08 13:31 (external edit)