[JSch-users] SCP and SFTP produce "Auth cancel" exception
Status: Alpha
Brought to you by:
ymnk
|
From: pafau k <rk...@gm...> - 2008-03-10 17:02:50
|
Hello, I'm trying to do SCP file transfer with username/password auth (no keys involved). I'm using almost verbatim version of example http://www.jcraft.com/jsch/examples/ScpToNoneCipher.java. There are two servers, sitting side by side, one of which works fine, other produces "Auth cancel" exception (Session.java:448). [good server] Login or failure takes about 4-5 seconds. On failure produces "Auth failed" exception. [bad server] No matter if given correct or incorrect credentials, _instantly_ (less than 1 sec) produces "Auth cancel" exception. Manual SCP ('scp file user@good_or_bad_server') works fine. On both servers command 'ssh -V' produces: OpenSSH_4.3p2 Debian-9, OpenSSL 0.9.8c 05 Sep 2006 My intuition tells me, that problem may be buried in this file: ----------------------------------+---------------------+-------------------------+ | /etc/ssh/sshd_conf differences | [good server value] | [bad server value] | +---------------------------------+---------------------+-------------------------+ | LoginGraceTime | 600 | 120 | | AuthorizedKeysFile | #commented out | %h/.ssh/authorized_keys | | ChallengeResponseAuthentication | #commented out | no | | PasswordAuthentication | no | #commented out | | KeepAlive | yes | -no entry- | | TCPKeepAlive | -no entry- | yes | +---------------------------------+---------------------+-------------------------+ ...although what most of these properties mean - I'm bereft of notion. Hopefully one of you knows it? If go and start shouting at the administrator I'd better know what I'm doing :) Since trying Sftp (as per http://www.jcraft.com/jsch/examples/Sftp.java) produces the same exact result ('Auth cancel' on bad server), i strongly suspect sshd_conf of inducing this mischevous behaviour. If anyone is able to clear those things for me - i'd be very grateful. greets -- pafau k. |