LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-28-2006, 12:47 PM   #1
rsz
LQ Newbie
 
Registered: Oct 2004
Location: Hungary
Distribution: Centos, Debian, Ubuntu, SLES
Posts: 8

Rep: Reputation: 0
I can ssh to my vps but the sftp does not work


Hi All!

I've a problem. i've got a virtual private server, and there runs an SHH daemon. By now i could connect there with ssh and i could upload files with SFTP.
But now, i can only use the ssh service, i can't reach the SFTP server. I didn't make any change in the sshd.conf nor in the IPTABLES.
And there is one more strange thing: if i connect to my VPS with ssh, i can use SFTP from my VPS to my home linux box.
What's the problem?

Thanks in advance
 
Old 10-28-2006, 01:13 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well i'd guess that thge sshd_config has changed somehow, and the sftp subsystem is disabled. do you have somethign like
Code:
# override default of no subsystems
Subsystem       sftp    /usr/libexec/openssh/sftp-server
in it? also check your logfiles e.g. /var/log/messages and also /var/log/secure for possible explanations. as the sftp traffic is tunneled inside ssh, it just loks like ssh traffic, and as such can't be blocked by a firewall when ssh is allowed. and as for connections the other, that has no bearing on this issue at all whatever it is.
 
Old 10-29-2006, 03:52 AM   #3
rsz
LQ Newbie
 
Registered: Oct 2004
Location: Hungary
Distribution: Centos, Debian, Ubuntu, SLES
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie
well i'd guess that thge sshd_config has changed somehow, and the sftp subsystem is disabled. do you have somethign like
Code:
# override default of no subsystems
Subsystem       sftp    /usr/libexec/openssh/sftp-server
in it? also check your logfiles e.g. /var/log/messages and also /var/log/secure for possible explanations. as the sftp traffic is tunneled inside ssh, it just loks like ssh traffic, and as such can't be blocked by a firewall when ssh is allowed. and as for connections the other, that has no bearing on this issue at all whatever it is.
Hi,
I've checked the sshd.conf, and there was "Subsystem sftp /usr/libexec/openssh/sftp-server".

Now, I've tried to sftp, and after checked my logfile.
It's strange because,it looks like everithing is ok, but than, if i give password, nothing happen.

/var/log/messages:
Oct 29 10:44:42 vps10012 sshd(pam_unix)[15362]: session opened for user root by (uid=0)

/var/log/secure:
Oct 29 10:44:42 vps10012 sshd[14327]: subsystem request for sftp


thank you for your help
 
Old 10-29-2006, 08:47 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what about adding a few -v's to the sftp command, to get client side debug output? also does scp work?
 
Old 10-29-2006, 10:54 AM   #5
rsz
LQ Newbie
 
Registered: Oct 2004
Location: Hungary
Distribution: Centos, Debian, Ubuntu, SLES
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie
what about adding a few -v's to the sftp command, to get client side debug output? also does scp work?
here is my ssh verbose output:

[root@localhost ~]# sftp -vvv XXX.XXX.41.108
Connecting to XXX.XXX.41.108...
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to XXX.XXX.41.108 [XXX.XXX.41.108] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 132/256
debug2: bits set: 524/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 1
debug1: Host 'XXX.XXX.41.108' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug2: bits set: 525/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /root/.ssh/id_rsa ((nil))
debug2: key: /root/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-with-mic,password
debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug2: we sent a gssapi-with-mic packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug2: we sent a gssapi-with-mic packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug2: we did not send a packet, disable method
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug3: no such identity: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug3: no such identity: /root/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
root@XXX.XXX.41.108's password:
debug3: packet_send2: adding 48 (len 66 padlen 14 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
debug2: fd 4 setting O_NONBLOCK
debug3: fd 5 is O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug1: Sending subsystem: sftp
debug2: channel 0: request subsystem confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072


-----------------------------------------------------------
 
Old 10-29-2006, 01:14 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
that's all of it? if so i'll come clean and say i've no idea at all... looks like it's perfectly happy and logging you in just fine.
 
Old 10-30-2006, 03:48 AM   #7
rsz
LQ Newbie
 
Registered: Oct 2004
Location: Hungary
Distribution: Centos, Debian, Ubuntu, SLES
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie
that's all of it? if so i'll come clean and say i've no idea at all... looks like it's perfectly happy and logging you in just fine.
I've found the problem.
When i'tried to scp there, i've got an error message, that there is a problem in DIR_COLORS file.
I've checked it, and i don't now why the DIR_COLORS was incredible big, and there were a lot of data, which it wouldn't be there.
I' deleted the unnecessary lines, and after that everything just working fine.

Thank you for your helping.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
sftp and ssh kehkok Linux - Networking 4 09-20-2006 02:53 PM
Where can I download UML VPS or Xen VPS to make a virtual private server? abefroman Linux - Software 3 12-09-2005 10:00 AM
SFTP and SSH XaViaR Linux - Security 5 07-20-2005 10:18 AM
sftp doesn't work in Konqueror after SSH/SSL upgrade Supernaut Slackware 4 10-28-2003 02:33 PM
ssh and sftp help Rex_chaos Linux - Networking 8 03-17-2003 08:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration