The Steps:
- Get the complete installer for PuTTY here. And install it.
- Use PuTTYgen and generate a public and private key.
- Select and copy all the stuff in the Public key box and open up a PuTTY/SSH connection to your destination site.
- If it doesn't exist,
mkdir .ssh ; chmod 700 .ssh ; cd .ssh
- If it doesn't exist, create the file
authorized_keys
and make its permissions 644:chmod 644 authorized_keys
- Edit, such as with
vi
theauthorized_keys
file and insert/paste the stuff copied before. Save and exit. - Save the private key file (still within PuTTYgen) somewhere convenient. It's up to you if you wish to specify a password on the private key. Obviously, it's more secure if you do, but it may be more of a pain.
- Start Pageant in a manner such as:
c:\program files\PuTTY\Pageant.exe c:\path\to\private.ppk
If you have a password on the private key, this is the time to input it. After Pageant runs, the key is loaded. You shouldn't need to worry about inputting the private key password again while Pageant runs. If you don't want to use Pageant, then you can choose to include the .ppk file in the SSH\Auth\Private key file for authentication box. - Create and save a PuTTY profile for your S/FTP destination. Along with Basic options (Host Name, Port, and (*)SSH), click Connection->Data and put your user name (!Important!). In SSH, make certain the preferred SSH version is 2. These are minimum settings. Go back to Session after making these changes, and click [Save].
- Test your connection. If you've followed all these instructions so far, you should be able to double-click the Saved Session and get to your prompt on your remote machine without a password!
- --- The Good Stuff --- Create a batch file
sftpit.bat
... It should look similar to :@echo put %1 | "c:\program files\PuTTY\psftp" -load YourPuTTYSessionName -batch
- Click Start, Run, type in
SendTo
and Press [Enter]/Click [OK] - Right-Click, New=>Shortcut and browse to the sftpit.bat. [Next]
- Give it some relevant name [Finish]
- Right-click a file, SendTo=>this shortcut.
No comments:
Post a Comment