`
zealotds
  • 浏览: 119483 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

SSH Without Password For Windows Clients

阅读更多
I guess a lot of folks like me need to work on Windows with remote Linux boxes. This is an integrated solution to easy your daily jobs -- SSH login. The basic idea here is to share your rsa key-pair between different SSH clients.

Several Tools You Might Need:

Generating SSH2 Key-pair:
  • Method A: simply issue ssh-keygen in MSYS shell
  • Mehotd B: start PUTTYGEN.exe and click "Generate" button.

Method A is recommended because it creates Linux compatible key-pair files and stores the files to $(HOME)/.ssh. In case you don't use MSYS, please follow PuTTY manual for method B to complete SSH authentication with PUTTYGEN.

Setup PuTTY To Use SSH Authentication:

Import MSYS Keys Into PUTTYGEN:
  • Conversions Menu > Import Key: import the "id_rsa" file under MSYS $HOME/.ssh
  • Click "Save private key" button to save private key to a .ppk file (for PuTTY only)
  • Click "Save public key" button to save a public key for PuTTY. (optional)

Config PuTTY:
  • start a PuTTY instance (default session)
  • browse to Connction > SSH > Auth > "Private key file for authentication"
  • points to the .ppk file you just created in above step.
  • browse to Session
  • click "Default Settings"
  • click "Save" button to save current config to your default settings.


Setup TotalCMD SFTP Plugin:

Create key files for SFTP plugin
  • start puttygen.exe
  • click "Load" buttong to load the .ppk file you created above
  • Conversions Menu > Export OpenSSH Key: export a private key (.pem file) for Total Command SFTP plugin
  • copy from "Public key for pasting into OpenSSH authorized_keys file"
  • paste into a new file named "rsa.pub" (this file is actually same to rsa.pub under MSYS $HOME/.ssh)

Config TotalCMD SFTP Connection: TotalCMD help gives you more detail -- click the '?' button besides "Public key file".
  • in TotalCMD, browse to Network Neighbor > Secure FTP
  • press F7 to create new connection
  • points to .pub file above for public key
  • points to .pem file above for private key


Publish your public key to the remote server:
# simply issue below 2 lines of command in MSYS shell
# both of the commands need you to input the password
ssh <user>@<remote_host> mkdir -p .ssh
cat .ssh/id_rsa.pub | ssh <user>@<remote_host> 'cat >> .ssh/authorized_keys'
# now you can forget the password, try this:
ssh <user>@<remote_host>

Check this article for more information
0
3
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics