Linux - Server This forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
06-29-2009, 07:32 AM
#1
LQ Newbie
Registered: Jun 2009
Posts: 10
Rep:
cannot login with sftp but with ssh
I have a problem with sftp login to a Ubuntu server. sftp works for root, but not for other users.
ssh works as usual and for all users.
Code:
[mattias@localhost ~]$ sftp -v mattias@*****.com
Connecting to ****.com...
OpenSSH_5.2p1, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to ****.com [****] port 22.
debug1: Connection established.
debug1: identity file /home/mattias/.ssh/id_rsa type -1
debug1: identity file /home/mattias/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-3ubuntu1
debug1: match: OpenSSH_5.1p1 Debian-3ubuntu1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2
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 '****.com' is known and matches the RSA host key.
debug1: Found key in /home/mattias/.ssh/known_hosts:2
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,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/mattias/.ssh/id_rsa
debug1: Trying private key: /home/mattias/.ssh/id_dsa
debug1: Next authentication method: password
mattias@****.com's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending subsystem: sftp
debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
Transferred: sent 1376, received 1960 bytes, in 0.1 seconds
Bytes per second: sent 23161.5, received 32991.7
debug1: Exit status -1
Connection closed
06-30-2009, 12:21 AM
#2
Member
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 89
Rep:
Quote:
Originally Posted by
MattiasKilbo
I have a problem with sftp login to a Ubuntu
debug1: Sending subsystem: sftp
debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0...............
[/CODE]
This link might help you.
http://www.unix.com/unix-advanced-ex...orks-root.html
Last edited by Febi881; 06-30-2009 at 01:24 AM .
06-30-2009, 03:09 AM
#3
LQ Newbie
Registered: Jun 2009
Posts: 10
Original Poster
Rep:
It did lead to some more information, but he did not have the same problem as I have now by the look of the logs.
sudo /etc/init.d/ssh restart -d gives me this when logging in.
Code:
debug1: sshd version OpenSSH_5.1p1 Debian-3ubuntu1
debug1: read PEM private key done: type RSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
error writing /proc/self/oom_adj: Operation not permitted
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
error writing /proc/self/oom_adj: Operation not permitted
debug1: inetd sockets after dupping: 3, 3
Connection from *.*.*.* port 11595
debug1: Client protocol version 2.0; client software version OpenSSH_5.2
debug1: match: OpenSSH_5.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1
debug1: permanently_set_uid: 103/65534
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST 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
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done
debug1: userauth-request for user mattias service ssh-connection method none
debug1: attempt 0 failures 0
debug1: PAM: initializing for "mattias"
debug1: PAM: setting PAM_RHOST to "****"
debug1: PAM: setting PAM_TTY to "ssh"
Failed none for mattias from *.*.*.* port 11595 ssh2
debug1: userauth-request for user mattias service ssh-connection method password
debug1: attempt 1 failures 0
debug1: PAM: password authentication accepted for mattias
debug1: do_pam_account: called
Accepted password for mattias from *.*.*.* port 11595 ssh2
debug1: monitor_child_preauth: mattias has been authenticated by privileged process
debug1: PAM: establishing credentials
User child is on pid 1371
debug1: SELinux support disabled
debug1: PAM: establishing credentials
debug1: permanently_set_uid: 1000/1000
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 2097152 max 32768
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_global_request: rtype no-more-sessions@openssh.com want_reply 0
debug1: server_input_channel_req: channel 0 request subsystem reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req subsystem
subsystem request for sftp
debug1: subsystem: exec() /usr/lib/openssh/sftp-server
debug1: Received SIGCHLD.
debug1: session_by_pid: pid 1452
debug1: session_exit_message: session 0 channel 0 pid 1452
debug1: session_exit_message: release channel 0
debug1: session_by_channel: session 0 channel 0
debug1: session_close_by_channel: channel 0 child 0
debug1: session_close: session 0 pid 0
debug1: channel 0: free: server-session, nchannels 1
Connection closed by *.*.*.*
debug1: do_cleanup
Transferred: sent 1960, received 1376 bytes
Closing connection to *.*.*.* port 11595
debug1: PAM: cleanup
debug1: PAM: deleting credentials
debug1: PAM: closing session
06-30-2009, 07:06 AM
#4
Member
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 89
Rep:
Quote:
Originally Posted by
MattiasKilbo
It did lead to some more information, but he did not have the same problem as I have now by the look of the logs.
...
[/CODE]
Check Weater your /etc/hosts.allow and hosts.deny file. Is it blocking something?
06-30-2009, 08:24 AM
#5
LQ Newbie
Registered: Jun 2009
Posts: 10
Original Poster
Rep:
both files are empty except for comments and this:
"sendmail: all"
line in /etc/hosts.allow
They are not blocking anything.
06-30-2009, 04:42 PM
#6
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Debian, FreeBSD
Posts: 3,755
Rep:
What are the permissions on /usr/lib/openssh/sftp-server?
07-01-2009, 04:45 AM
#7
LQ Newbie
Registered: Jun 2009
Posts: 10
Original Poster
Rep:
The permissions on /usr/lib/openssh/sftp-server are
-rwxr-xr-x 1 root root 50900 2008-10-13 20:50 sftp-server
chmod 777 did not change anything.
11-07-2009, 02:29 PM
#8
LQ Newbie
Registered: Nov 2009
Posts: 1
Rep:
I have the same problem. Have you solved it?
11-08-2009, 03:45 AM
#9
LQ Newbie
Registered: Jun 2009
Posts: 10
Original Poster
Rep:
No, but I'm not working at the company with the problem anymore.
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 05:46 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News