interactive commands via plink.exe -> linux/sshd

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I am writing a backup tool and need to run an interactive shell via
putty/PLINK to push the backup data to the server via rsync. My
connection just seems to die as if the client cancelled the connection,
which I am not doing on purpose.  My program attempts to trap for y/n
and yes/no and enter the appropriate response in the shell.

 Here is the debug output:

Server debug output:

debug1: sshd version OpenSSH_3.6.1p2
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: Bind to port 10001 on ::.
Server listening on :: port 10001.
debug1: Bind to port 10001 on
Bind to port 10001 on failed: Address already in use.
Generating 768 bit RSA key.
RSA key generation complete.
debug1: Server will not fork when running in debugging mode.
Connection from ::ffff: port 34489
debug1: Client protocol version 2.0; client software version PuTTY-Release-0.56
debug1: no match: PuTTY-Release-0.56
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-1.99-OpenSSH_3.6.1p2
debug1: permanently_set_uid: 74/74
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: client->server aes256-cbc hmac-sha1 none
debug1: kex: server->client aes256-cbc hmac-sha1 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD received
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT
debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
Connection closed by ::ffff:
debug1: Calling cleanup 0x806efa0(0x0)

PLINK.exe output:

opening connection using PLINK -P 10001 -t -t -v -ssh -pw ********* -l
backup rsync --server -vvlogDtprz .
Server version: SSH-1.99-OpenSSH_3.6.1p2
We claim version: SSH-2.0-PuTTY-Release-0.56
Using SSH protocol version 2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's rsa2 key fingerprint is:
ssh-rsa 1024 59:aa:df:e1:a6:c6:c3:0d:c2:38:13:6f:af:09:95:eb
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
Store key in cache? (y/n) Connection abandoned.
rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(515)

Thanks in advance,


Site Timeline