SSH Without Password For Windows Clients

10 篇文章 0 订阅
3 篇文章 0 订阅
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.

[size=large][b]Several Tools You Might Need:[/b][/size]
[list]
[*][url=http://www.mingw.org/wiki/MSYS]MSYS Base System[/url]
[*]PuTTY
[*][url=http://www.ghisler.com/]Total Commander[/url] (with SFTP plugin)
[/list]
[size=large][b]Generating SSH2 Key-pair:[/b][/size]
[list]
[*]Method A: simply issue ssh-keygen in MSYS shell
[*]Mehotd B: start PUTTYGEN.exe and click "Generate" button.
[/list]
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.

[size=large][b]Setup PuTTY To Use SSH Authentication:[/b][/size]

Import MSYS Keys Into PUTTYGEN:
[list]
[*]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)
[/list]
Config PuTTY:
[list]
[*]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.
[/list]

[size=large][b]Setup TotalCMD SFTP Plugin:[/b][/size]

Create key files for SFTP plugin
[list]
[*]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)
[/list]
Config TotalCMD SFTP Connection: TotalCMD help gives you more detail -- click the '?' button besides "Public key file".
[list]
[*]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
[/list]

[size=large][b]Publish your public key to the remote server:[/b] [/size]
# 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 [url=http://www.linuxproblem.org/art_9.html]this article[/url] for more information
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值