pscp without password

To transfer files periodically from Windows Machine back to your unix account storage , running pscp (putty ‘s scp tools), can be considered though scheduler with a private key . Steps below :

1. Download for pscp & puttygen here

2. Start puttygen , randomly move your mouse over blank area for generating public/private key pair :
puttygen0.JPG
3. The key pair is generated as below . Download the file private-key as “private-key.ppk” , and public-key file as “public-key-file-pc1”

puttygen1.JPG

4. Upload “public-key-file-pc1” to ~/.ssh . Then run the following command to import into ~/.ssh/ :

% ssh-keygen -i -f ~/.ssh/public-key-file-pc1 > ~/.ssh/user-public-key-pc1.pub
% cat ~/.ssh/user-public-key-pc1.pub >> ~/.ssh/authorized_keys2

5. Then you can test pscp by copy a file to a user’s subdirectory under his unix account :

C:\tools>pscp.exe -i private-key.ppk c:\data\files-backup.zip user1@unix-machine:/user/home/user1/windows-file/

files-backup.zip | 472 kB | 472.0 kB/s | ETA: 00:00:00 | 100%

6. Start the windows scheduler to test with a cmd file with above likewise command.

You may also like...