PDA

View Full Version : sftp connection closed error for nonroot user



tpumma
15th April 2008, 06:35 PM
I encountered following sftp error:

Connection closed

Here is sftp command and result:

sftp ted@192.168.196.129
Connecting to 192.168.196.129...
ted@192.168.196.129's password:
Connection closed

I can successfully connect sftp as root user:

sftp root@192.168.196.129
Connecting to 192.168.196.129...
root@192.168.196.129's password:
sftp>

i have following line from /etc/rssh.conf:

user=ted:011:00010:"/home/ted" # sftp with chroot

Am I missing something? i would like nonroot user to access sftp. Please advise...

avaldez99
3rd May 2011, 10:24 PM
I have the same problem with sftp and also with ssh permission error see log thanks


avaldez@linuxbox01:~$ ssh -v t2@172.16.11.238
OpenSSH_5.3p1 Debian-3ubuntu6, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 172.16.11.238 [172.16.11.238] port 22.
debug1: Connection established.
debug1: identity file /home/avaldez/.ssh/identity type -1
debug1: identity file /home/avaldez/.ssh/id_rsa type -1
debug1: identity file /home/avaldez/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '172.16.11.238' is known and matches the RSA host key.
debug1: Found key in /home/avaldez/.ssh/known_hosts:4
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied


debug1: Next authentication method: publickey
debug1: Trying private key: /home/avaldez/.ssh/identity
debug1: Trying private key: /home/avaldez/.ssh/id_rsa
debug1: Trying private key: /home/avaldez/.ssh/id_dsa
debug1: Next authentication method: password
t2@172.16.11.238's password:
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
Permission denied, please try again.
t2@172.16.11.238's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Last login: Tue May 3 12:57:02 2011 from 172.16.10.73
Could not chdir to home directory /home/jail/home/t2: Permission denied
/bin/su: user t2 does not exist
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to 172.16.11.238 closed.
Transferred: sent 1824, received 2200 bytes, in 0.0 seconds
Bytes per second: sent 66564.3, received 80285.9
debug1: Exit status 1
avaldez@linuxbox01:~$ clear

avaldez@linuxbox01:~$
avaldez@linuxbox01:~$
avaldez@linuxbox01:~$ sftp -v t2@172.16.11.238
Connecting to 172.16.11.238...
OpenSSH_5.3p1 Debian-3ubuntu6, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 172.16.11.238 [172.16.11.238] port 22.
debug1: Connection established.
debug1: identity file /home/avaldez/.ssh/id_rsa type -1
debug1: identity file /home/avaldez/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '172.16.11.238' is known and matches the RSA host key.
debug1: Found key in /home/avaldez/.ssh/known_hosts:4
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied


debug1: Next authentication method: publickey
debug1: Trying private key: /home/avaldez/.ssh/id_rsa
debug1: Trying private key: /home/avaldez/.ssh/id_dsa
debug1: Next authentication method: password
t2@172.16.11.238's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending subsystem: sftp
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
Transferred: sent 1424, received 1848 bytes, in 0.1 seconds
Bytes per second: sent 22679.5, received 29432.3
debug1: Exit status 1
Connection closed





ssh -v t2@172.16.11.238
OpenSSH_5.3p1 Debian-3ubuntu6, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 172.16.11.238 [172.16.11.238] port 22.
debug1: Connection established.
debug1: identity file /home/avaldez/.ssh/identity type -1
debug1: identity file /home/avaldez/.ssh/id_rsa type -1
debug1: identity file /home/avaldez/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '172.16.11.238' is known and matches the RSA host key.
debug1: Found key in /home/avaldez/.ssh/known_hosts:4
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied
Cannot determine realm for numeric host address

debug1: An invalid name was supplied


debug1: Next authentication method: publickey
debug1: Trying private key: /home/avaldez/.ssh/identity
debug1: Trying private key: /home/avaldez/.ssh/id_rsa
debug1: Trying private key: /home/avaldez/.ssh/id_dsa
debug1: Next authentication method: password
t2@172.16.11.238's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Last login: Tue May 3 14:18:06 2011 from 172.16.10.73
Could not chdir to home directory /home/jail/home/t2: Permission denied
/bin/su: user t2 does not exist
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to 172.16.11.238 closed.
Transferred: sent 1696, received 2136 bytes, in 0.0 seconds
Bytes per second: sent 64432.6, received 81148.6
debug1: Exit status 1
avaldez@linuxbox01:~$

bob
3rd May 2011, 10:54 PM
Avaldez99, first of all, don't tag your post onto a dead thread, start your own.
Second, this is a Fedora forum, not Ubuntu. Why are you posting here?

Anyway, this thread's closed.