?
Solved

Is it possible to use RSYNC with PLINK.EXE(PUTTY) as Remote shell?

Posted on 2004-08-04
3
Medium Priority
?
3,106 Views
Last Modified: 2013-12-15
I would like to automate backups from win32 cygwin environment to a linux backup server with rsync.
I can use rsync -e ssh but always get asked for a password (needs to be automated).
plink.exe has the option -pw to pass the password but I cannot get this to work in conjunction with the RSYNC -e remote shell option.

I have tried the following,

>rsync -e plink username@1.2.3.4:\
Access denied
Access denied
FATAL ERROR: Server sent disconnect message
type 2(SSH_DISCONNECT_PROTOCOL_ERROR):
"Too many authentication failures for username"
rsync:read error:Connection reset by peer
rsync error: error in resync protocol data stream (code 12) at io.c(354)

>rsync -e "plink 1.2.3.4 -l username -pw password" username@1.2.3.4:\
bash: line 1: 1.2.3.4: command not found
rsync: read error: Connection reset by peer
rsync error: error in resync protocol data stream (code 12) at io.c(354)

BUT the following works fine using ssh as the transport
>rsync -e ssh username@1.2.3.4:\

0
Comment
Question by:carillian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:pYrania
ID: 11714336
enable id-based authentification.

http://mah.everybody.org/docs/ssh
0
 

Author Comment

by:carillian
ID: 11715448
I want to pipe a password into rsync using a VB app - do not want to really leave private keys lying around for people to wander off with.

Anyone tried PLINK ? I need RSYNC functionality.
0
 
LVL 2

Accepted Solution

by:
kevincasey earned 1500 total points
ID: 11973415
i use plink and pageant for cvs access to a linux machine, and i image the setup is similar.

1) create a public/private keyset using puttygen.exe.  you're right, you don't want to leave the keys lying around - so put them into a folder where only the user running the program has read access

2) setup a profile using putty.exe so that you can login using the keys created above (you'll probably have to copy/paste the public key to your server, too)

3) start pageant with the file path to your private key as an argument (e.g pageant.exe "c:\documents and settings\operator\my documents\etc")

4) now whenever plink.exe is invoked pageant will pass on the appropriate key

keysets with the appropriate permissions are the foundation of public key cryptography.  i'm guessing the vb app would just be a wrapper that writes the password to standard out - which is not very secure at all.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month15 days, left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question