vimotaru 0 Newbie Poster

Hi all

I'm having problems with a remote connection by sftp. I'm using public key to connect avoiding the passwd request. The correct key is added to the authorized_keys file.

The problem is that the remote host is closing the session. (I'm in charge of the incoming host, a partner in other location is trying to connect to my host via sftp).

I've test with dsa key, rsa key, with different permissions and groups. It was working fine but after add another key for other user connection, it cease to work (all of them).

The vervose of the command is:

/usr: sftp -v msva@10.235.149.12 
  
Connecting to 10.235.149.12... 
OpenSSH_2.9.9p2, SSH protocols 1.5/2.0, OpenSSL 0x0090601f 
debug1: Reading configuration data /etc/ssh/ssh_config 
debug1: Seeding random number generator 
debug1: Creating Local Socket to 790 
debug1: Connecting to PORT 790 
debug1: Write to 790 
debug1: Read Select wait on 790 
debug1: Read on 790 
debug1: Finish get_random_bytes 
debug1: Rhosts Authentication disabled, originating port will not be trusted. 
debug1: restore_uid 
debug1: ssh_connect: getuid 65535 geteuid 65535 anon 1 
debug1: Connecting to 10.235.149.12 [10.235.149.12] port 22. 
debug1: restore_uid 
debug1: restore_uid 
debug1: Connection established. 
debug1: read PEM private key done: type DSA 
debug1: read PEM private key done: type RSA 
debug1: identity file /usr/.ssh/id_rsa type 1 
debug1: identity file /usr/.ssh/id_dsa type 2 
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1 
debug1: match: OpenSSH_5.1 pat ^OpenSSH 
Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_2.9.9p2 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: server->client aes128-cbc hmac-md5 none 
debug1: kex: client->server aes128-cbc hmac-md5 none 
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP 
debug1: dh_gen_key: priv key bits set: 127/256 
debug1: bits set: 1000/2048 
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY 
debug1: Host '10.235.149.12' is known and matches the RSA host key. 
debug1: Found key in /usr/.ssh/known_hosts:175 
debug1: bits set: 981/2048 
debug1: ssh_rsa_verify: signature correct 
debug1: kex_derive_keys 
debug1: newkeys: mode 1 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: waiting for SSH2_MSG_NEWKEYS 
debug1: newkeys: mode 0 
debug1: SSH2_MSG_NEWKEYS received 
debug1: done: ssh_kex2. 
debug1: send SSH2_MSG_SERVICE_REQUEST 
debug1: service_accept: ssh-userauth 
debug1: got SSH2_MSG_SERVICE_ACCEPT 
debug1: authentications that can continue: publickey,password,keyboard-interacti 
ve 
debug1: next auth method to try is publickey 
debug1: try pubkey: /usr/.ssh/id_rsa 
debug1: authentications that can continue: publickey,password,keyboard-interacti 
ve 
debug1: try pubkey: /usr/.ssh/id_dsa 
debug1: input_userauth_pk_ok: pkalg ssh-dss blen 433 lastkey 801b6e0 hint 1 
debug1: read PEM private key done: type DSA 
debug1: ssh-userauth2 successful: method publickey 
debug1: fd 4 setting O_NONBLOCK 
debug1: fd 5 setting O_NONBLOCK 
debug1: channel 0: new [client-session] 
debug1: send channel open 0 
debug1: Entering interactive session. 
debug1: channel_free: channel 0: client-session, nchannels 1 
debug1: channel_free: channel 0: detaching channel user 
debug1: fd 0 clearing O_NONBLOCK 
debug1: fd 1 clearing O_NONBLOCK 
Connection to 10.235.149.12 closed by remote host. 
debug1: Transferred: stdin 0, stdout 0, stderr 52 bytes in 0.0 seconds 
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 16069.2 
debug1: Exit status -1 
Connection closed 
/usr:

Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.