LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 06-29-2009, 07:32 AM   #1
MattiasKilbo
LQ Newbie
 
Registered: Jun 2009
Posts: 10

Rep: Reputation: 0
Question 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
 
Old 06-30-2009, 12:21 AM   #2
Febi881
Member
 
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 103
Blog Entries: 1

Rep: Reputation: 17
Quote:
Originally Posted by MattiasKilbo View Post
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.
 
Old 06-30-2009, 03:09 AM   #3
MattiasKilbo
LQ Newbie
 
Registered: Jun 2009
Posts: 10

Original Poster
Rep: Reputation: 0
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
 
Old 06-30-2009, 07:06 AM   #4
Febi881
Member
 
Registered: Jun 2009
Location: India
Distribution: Fedora,Redhat
Posts: 103
Blog Entries: 1

Rep: Reputation: 17
Quote:
Originally Posted by MattiasKilbo View Post
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?
 
Old 06-30-2009, 08:24 AM   #5
MattiasKilbo
LQ Newbie
 
Registered: Jun 2009
Posts: 10

Original Poster
Rep: Reputation: 0
both files are empty except for comments and this:
"sendmail: all"
line in /etc/hosts.allow
They are not blocking anything.
 
Old 06-30-2009, 04:42 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, FreeBSD
Posts: 3,925
Blog Entries: 5

Rep: Reputation: Disabled
What are the permissions on /usr/lib/openssh/sftp-server?
 
Old 07-01-2009, 04:45 AM   #7
MattiasKilbo
LQ Newbie
 
Registered: Jun 2009
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 11-07-2009, 02:29 PM   #8
cienfuegos
LQ Newbie
 
Registered: Nov 2009
Posts: 1

Rep: Reputation: 0
I have the same problem. Have you solved it?
 
Old 11-08-2009, 03:45 AM   #9
MattiasKilbo
LQ Newbie
 
Registered: Jun 2009
Posts: 10

Original Poster
Rep: Reputation: 0
No, but I'm not working at the company with the problem anymore.
 
  


Reply

Tags
sftp


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh login works but sftp doesn't... koyi Linux - Networking 8 02-28-2011 08:34 AM
Chroot SSH problem: ssh working, not SFTP & SCP. NaCo Linux - Security 3 02-01-2009 02:23 AM
would like to disable direct root login using ssh/sftp rholme Linux - Newbie 4 05-17-2008 07:12 PM
cannot login into SFTP server using Net::SFTP cccc Programming 1 10-31-2007 06:23 AM
Restricting SFTP, SSH Remote Login majicrobot Linux - Security 1 09-20-2004 10:54 AM


All times are GMT -5. The time now is 05:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration