User Tools

Site Tools


services:2fa:ssh:putty

Differences

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

Link to this comparison view

Next revision
Previous revision
services:2fa:ssh:putty [2021/03/22 11:31] – created deulservices:2fa:ssh:putty [2021/03/26 15:31] (current) deul
Line 1: Line 1:
 ======Setup key based login from Putty====== ======Setup key based login from Putty======
-Before we can use key based login, we first need to create a private/public key set. This is done by the program PuTTYgen. Open this program: +Before we can use key based login, we first need to create a private/public key set. This is done by the [[https://the.earth.li/~sgtatham/putty/latest/w64/puttygen.exe|program PuTTYgen]]. Open this program: 
-{{ :services:2fa:ssh:putty6.png?400 |}}+{{ :services:2fa:ssh:putty_1.png?400 |}}
  
-and hit the 'Generate'key. You will have to move your mouse around as this will help randomness in the creation of the key pair. Once the keys have been created you need to save each key in its own file. +and provide a passphrase before hiting the 'Generate'key. You will have to move your mouse around as this will help randomness in the creation of the key pair. It is strongly advised to provide a complex passphrase which is not your account password!, as this is the only way to secure illegal use of your key pair. Once the keys have been created you need to save each key in its own file. 
-{{ :services:2fa:ssh:putty7.png?400 |}}+{{ :services:2fa:ssh:putty_2.png?400 |}}
  
 Make sure to use sensible file names for the two key files. The private key is automatically appended with the .ppk extension, while the public key does not need an extension. Make sure to use sensible file names for the two key files. The private key is automatically appended with the .ppk extension, while the public key does not need an extension.
Line 12: Line 12:
 {{ :services:2fa:ssh:putty9.png?400 |}} {{ :services:2fa:ssh:putty9.png?400 |}}
  
-Finally, we need to tell PuTTY to use a particular account name for accessing the public key (which we still need to upload). So go to tab Connection / DATA and fill in your ULCN account name in the 'Auto-login username' box.+Finally, we need to tell PuTTY to use a particular account name for accessing the public key (which we still need to upload). So go to tab Connection / DATA and fill in your STRW account name in the 'Auto-login username' box.
 {{ :services:2fa:ssh:putty11.png?400 |}} {{ :services:2fa:ssh:putty11.png?400 |}}
  
Line 20: Line 20:
 {{ :services:2fa:ssh:putty10.png?400 |}} {{ :services:2fa:ssh:putty10.png?400 |}}
  
-Open the login session to the server (you still have to provide your password), then go to the .ssh directory and edit the authorized_keys file using an editor (e.g. vi) and paste in the copied text from the public file. Make sure the pasted text is one line! Perpend that line with ssh-rsa (the default key type from puttygen) and save the file.+Open the login session to the server (you still have to provide your password), then go to the .ssh directory and edit the authorized_keys file using an editor (e.g. vi) and paste in the copied text from the public file. Make sure the pasted text is one line! Perpend that line with ecdsa-sha2-nistp256 (the selected key type from puttygen) and save the file.
 {{ :services:2fa:ssh:putty12.png?400 |}} {{ :services:2fa:ssh:putty12.png?400 |}}
  
-Once the authorized_key file is saved, you can login without typing your password/2fa code.+Once the authorized_key file is saved, you can login without typing your password/2fa code, you just have to provide the passphrase.
  
services/2fa/ssh/putty.1616412683.txt.gz · Last modified: 2021/03/22 11:31 by deul