I have two users with valid SSH accounts on a server. Both users can login via ssh successfully.
When trying to mount SSHFS, usera can mount with no problems, while userb gets the error:
remote host has disconnected
after entering a valid password.
In the auth.log we get:
Apr 25 19:12:49 Ophelia sshd[26211]: Accepted password for userb from [ip address] port 44609 ssh2
Apr 25 19:12:49 Ophelia sshd[26211]: pam_unix(sshd:session): session opened for user userb by (uid=0)
Apr 25 19:12:49 Ophelia sshd[26240]: subsystem request for sftp
Apr 25 19:12:49 Ophelia sshd[26240]: Received disconnect from [ip address]: 11: disconnected by user
Apr 25 19:12:49 Ophelia sshd[26211]: pam_unix(sshd:session): session closed for user userb
I read that remote host has disconnected
can be caused by an invalid sftp-server in /etc/ssh/sshd_config
, but the path is set to /usr/lib/openssh/sftp-server
which appears valid, and usera can use SSHFS just fine.
The server and client are Ubuntu 10.04.
Any suggestions?
Best Answer
From the OpenSSH FAQ (via knoppixforum.de, English translation here):
Also try
ssh user@host /bin/true
.