.NET assembly automation SSH server error
I'm getting the "incoming packet was garbled on decryption" error when using the .net assembly to connect to the server...
i searched the forums and faqs, but only found info using the gui...
i even set the defaults on the gui based on what i read...
is there a way to programatically set up something to connect?
here's the log output:
Session name: user@something.com (Ad-Hoc session)
. 2012-05-23 14:44:35.357 Host name: something.com (Port: 22)
. 2012-05-23 14:44:35.357 User name: user (Password: Yes, Key file: No)
. 2012-05-23 14:44:35.357 Tunnel: No
. 2012-05-23 14:44:35.357 Transfer Protocol: SFTP
. 2012-05-23 14:44:35.357 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2012-05-23 14:44:35.357 Proxy: none
. 2012-05-23 14:44:35.357 SSH protocol version: 2; Compression: No
. 2012-05-23 14:44:35.357 Bypass authentication: No
. 2012-05-23 14:44:35.358 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2012-05-23 14:44:35.358 Ciphers: blowfish,aes,3des,WARN,arcfour,des; Ssh2DES: No
. 2012-05-23 14:44:35.358 SSH Bugs: -,-,-,-,-,-,-,-,-,-
. 2012-05-23 14:44:35.358 SFTP Bugs: -,-
. 2012-05-23 14:44:35.358 Return code variable: Autodetect; Lookup user groups: -
. 2012-05-23 14:44:35.358 Shell: default
. 2012-05-23 14:44:35.358 EOL: 0, UTF: 2
. 2012-05-23 14:44:35.358 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2012-05-23 14:44:35.358 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2012-05-23 14:44:35.358 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2012-05-23 14:44:35.358 Cache directory changes: Yes, Permanent: Yes
. 2012-05-23 14:44:35.358 DST mode: 1
. 2012-05-23 14:44:35.358 --------------------------------------------------------------------------
. 2012-05-23 14:44:35.358 Looking up host "something.com"
. 2012-05-23 14:44:35.362 Connecting to 159.54.32.85 port 22
. 2012-05-23 14:44:35.527 Server version: SSH-2.0-9.99 sshlib: 7.0.0.1
. 2012-05-23 14:44:35.527 Using SSH protocol version 2
. 2012-05-23 14:44:35.527 We claim version: SSH-2.0-WinSCP_release_5.0.7
. 2012-05-23 14:44:35.554 Doing Diffie-Hellman group exchange
. 2012-05-23 14:44:35.817 Doing Diffie-Hellman key exchange with hash SHA-1
. 2012-05-23 14:44:35.996 Verifying host key dss 0xf41c02e1f7a8ab7b65f62c83396fdaba76205da0ab2680945a370a7d12cb002b22df65c4371e90eadc276f1ccb2f3d7be4cbdfd0b596dfad02adbc59c38cb49c124227193bfdc947019f3e7c5cc3a055bd0a96a7cffb88b3702be2ad09c0689107003d3b9fb754ba61bc927100de4fff2362e81d499162f5e6df7f602416681b,0xeaf66d665c8d51b1d8a7d01deb6749f9a06f0be9,0x2b6b0fcf4f62261779cc0913433f18e2d334b6816793f1b54b9e524fab80898b759ba60cc70445b1adad7f581f1c16bdf57a0c556cee12dcdc75c32a7f73d66e786b888ee5d2fdf6f81929c068f1d3f7571b9de6a98cf1b94c3dc591c59d99511d9b8661113eea736db947ce6877dfb3cc3347e87d24ed48920591df6339018b,0x51f82b1b98b6c7224ed539da773704d2ba960c1acc358422363af4bda2d752e638f26256c667b1d474b76088c33065adfbc435eed17bae45862c2444a0549d9a8e5fab4d417a4dacf75d41d77c5c6ff1ce7f7b120b8fddd9203a7f528c55912149d28130a398caedd669a378397e2cd82bcfb3c4c24deac120b563c742904578 with fingerprint ssh-dss 1024 90:a8:5e:52:07:48:7e:e8:7f:93:c2:5f:b0:13:61:07
. 2012-05-23 14:44:35.996 Host key matches configured key
. 2012-05-23 14:44:35.996 Host key fingerprint is:
. 2012-05-23 14:44:35.996 ssh-dss 1024 90:a8:5e:52:07:48:7e:e8:7f:93:c2:5f:b0:13:61:07
. 2012-05-23 14:44:35.996 Initialised Blowfish-256 SDCTR client->server encryption
. 2012-05-23 14:44:35.996 Initialised HMAC-SHA1 client->server MAC algorithm
. 2012-05-23 14:44:35.997 Initialised Blowfish-256 SDCTR server->client encryption
. 2012-05-23 14:44:35.997 Initialised HMAC-SHA1 server->client MAC algorithm
. 2012-05-23 14:44:36.260 Incoming packet was garbled on decryption
here's the code:
SessionOptions sftpOpts = null;
try
{
sftpOpts = new SessionOptions();
sftpOpts.HostName = f_server;
sftpOpts.UserName = f_user;
sftpOpts.Password = f_pass;
sftpOpts.Protocol = Protocol.Sftp;
//sftpOpts.FtpMode = FtpMode.Active;
sftpOpts.SshHostKey = "ssh-dss 1024 90:a8:5e:52:07:48:7e:e8:7f:93:c2:5f:b0:13:61:07";
_ftp = new Session();
_ftp.Open(sftpOpts);
thanks in advance...
i searched the forums and faqs, but only found info using the gui...
i even set the defaults on the gui based on what i read...
is there a way to programatically set up something to connect?
here's the log output:
Session name: user@something.com (Ad-Hoc session)
. 2012-05-23 14:44:35.357 Host name: something.com (Port: 22)
. 2012-05-23 14:44:35.357 User name: user (Password: Yes, Key file: No)
. 2012-05-23 14:44:35.357 Tunnel: No
. 2012-05-23 14:44:35.357 Transfer Protocol: SFTP
. 2012-05-23 14:44:35.357 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2012-05-23 14:44:35.357 Proxy: none
. 2012-05-23 14:44:35.357 SSH protocol version: 2; Compression: No
. 2012-05-23 14:44:35.357 Bypass authentication: No
. 2012-05-23 14:44:35.358 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2012-05-23 14:44:35.358 Ciphers: blowfish,aes,3des,WARN,arcfour,des; Ssh2DES: No
. 2012-05-23 14:44:35.358 SSH Bugs: -,-,-,-,-,-,-,-,-,-
. 2012-05-23 14:44:35.358 SFTP Bugs: -,-
. 2012-05-23 14:44:35.358 Return code variable: Autodetect; Lookup user groups: -
. 2012-05-23 14:44:35.358 Shell: default
. 2012-05-23 14:44:35.358 EOL: 0, UTF: 2
. 2012-05-23 14:44:35.358 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2012-05-23 14:44:35.358 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2012-05-23 14:44:35.358 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2012-05-23 14:44:35.358 Cache directory changes: Yes, Permanent: Yes
. 2012-05-23 14:44:35.358 DST mode: 1
. 2012-05-23 14:44:35.358 --------------------------------------------------------------------------
. 2012-05-23 14:44:35.358 Looking up host "something.com"
. 2012-05-23 14:44:35.362 Connecting to 159.54.32.85 port 22
. 2012-05-23 14:44:35.527 Server version: SSH-2.0-9.99 sshlib: 7.0.0.1
. 2012-05-23 14:44:35.527 Using SSH protocol version 2
. 2012-05-23 14:44:35.527 We claim version: SSH-2.0-WinSCP_release_5.0.7
. 2012-05-23 14:44:35.554 Doing Diffie-Hellman group exchange
. 2012-05-23 14:44:35.817 Doing Diffie-Hellman key exchange with hash SHA-1
. 2012-05-23 14:44:35.996 Verifying host key dss 0xf41c02e1f7a8ab7b65f62c83396fdaba76205da0ab2680945a370a7d12cb002b22df65c4371e90eadc276f1ccb2f3d7be4cbdfd0b596dfad02adbc59c38cb49c124227193bfdc947019f3e7c5cc3a055bd0a96a7cffb88b3702be2ad09c0689107003d3b9fb754ba61bc927100de4fff2362e81d499162f5e6df7f602416681b,0xeaf66d665c8d51b1d8a7d01deb6749f9a06f0be9,0x2b6b0fcf4f62261779cc0913433f18e2d334b6816793f1b54b9e524fab80898b759ba60cc70445b1adad7f581f1c16bdf57a0c556cee12dcdc75c32a7f73d66e786b888ee5d2fdf6f81929c068f1d3f7571b9de6a98cf1b94c3dc591c59d99511d9b8661113eea736db947ce6877dfb3cc3347e87d24ed48920591df6339018b,0x51f82b1b98b6c7224ed539da773704d2ba960c1acc358422363af4bda2d752e638f26256c667b1d474b76088c33065adfbc435eed17bae45862c2444a0549d9a8e5fab4d417a4dacf75d41d77c5c6ff1ce7f7b120b8fddd9203a7f528c55912149d28130a398caedd669a378397e2cd82bcfb3c4c24deac120b563c742904578 with fingerprint ssh-dss 1024 90:a8:5e:52:07:48:7e:e8:7f:93:c2:5f:b0:13:61:07
. 2012-05-23 14:44:35.996 Host key matches configured key
. 2012-05-23 14:44:35.996 Host key fingerprint is:
. 2012-05-23 14:44:35.996 ssh-dss 1024 90:a8:5e:52:07:48:7e:e8:7f:93:c2:5f:b0:13:61:07
. 2012-05-23 14:44:35.996 Initialised Blowfish-256 SDCTR client->server encryption
. 2012-05-23 14:44:35.996 Initialised HMAC-SHA1 client->server MAC algorithm
. 2012-05-23 14:44:35.997 Initialised Blowfish-256 SDCTR server->client encryption
. 2012-05-23 14:44:35.997 Initialised HMAC-SHA1 server->client MAC algorithm
. 2012-05-23 14:44:36.260 Incoming packet was garbled on decryption
here's the code:
SessionOptions sftpOpts = null;
try
{
sftpOpts = new SessionOptions();
sftpOpts.HostName = f_server;
sftpOpts.UserName = f_user;
sftpOpts.Password = f_pass;
sftpOpts.Protocol = Protocol.Sftp;
//sftpOpts.FtpMode = FtpMode.Active;
sftpOpts.SshHostKey = "ssh-dss 1024 90:a8:5e:52:07:48:7e:e8:7f:93:c2:5f:b0:13:61:07";
_ftp = new Session();
_ftp.Open(sftpOpts);
thanks in advance...