Difference between revisions of "SSH keys"

From Mesopoly 3.0
Jump to navigation Jump to search
m
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
*used this recipe http://www.brandonhutchinson.com/WinSCP_public_key_authentication.html
+
===To transfer files via WinSCP without password===
  
 
*download WinSCP package (including key-generating PuttyGen.exe) at http://winscp.net/eng/download.php . Available in zip format http://the.earth.li/~sgtatham/putty/0.60/x86/putty.zip here.
 
*download WinSCP package (including key-generating PuttyGen.exe) at http://winscp.net/eng/download.php . Available in zip format http://the.earth.li/~sgtatham/putty/0.60/x86/putty.zip here.
Line 7: Line 7:
 
*leave 'passphrase' fields empty
 
*leave 'passphrase' fields empty
 
*click to save 'private key' as you would need this in client
 
*click to save 'private key' as you would need this in client
*copy (do not use 'save public key' for unix use!) public key as displayed on the top of the screen
+
*select and copy public key as displayed on the top of the screen (do not use 'save public key' for unix use, as there is additional info in this file)
 
*paste and save the public key into your home directory on unix host, into file .ssh/authorized_keys
 
*paste and save the public key into your home directory on unix host, into file .ssh/authorized_keys
 
*chmod 700 .ssh
 
*chmod 700 .ssh
 
*chmod 600 authorized_keys
 
*chmod 600 authorized_keys
*also, will not work if your home directory has group permissions until you set StrictModes to 'no'
+
*will not work if your home directory has group write permission until you set StrictModes to 'no' in sshd_config (do not forget to restart sshd if making changes to configuration)
*do not forget to restart sshd when making changes to configuration
+
*type hostname, username, select port 22 and select your previously created 'private key file' (leave 'password' field empty so 'private key file' field remains alive)

Latest revision as of 11:03, 20 December 2007

To transfer files via WinSCP without password

  • download WinSCP package (including key-generating PuttyGen.exe) at http://winscp.net/eng/download.php . Available in zip format http://the.earth.li/~sgtatham/putty/0.60/x86/putty.zip here.
  • double click puttygen.exe to start it
  • select SSH-2 RSA (default) and click 'generate'
  • 'create some randomness' as instructed on screen
  • leave 'passphrase' fields empty
  • click to save 'private key' as you would need this in client
  • select and copy public key as displayed on the top of the screen (do not use 'save public key' for unix use, as there is additional info in this file)
  • paste and save the public key into your home directory on unix host, into file .ssh/authorized_keys
  • chmod 700 .ssh
  • chmod 600 authorized_keys
  • will not work if your home directory has group write permission until you set StrictModes to 'no' in sshd_config (do not forget to restart sshd if making changes to configuration)
  • type hostname, username, select port 22 and select your previously created 'private key file' (leave 'password' field empty so 'private key file' field remains alive)