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]
Check [url=http://www.linuxproblem.org/art_9.html]this article[/url] for more information
[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