I know this problem has been solved before, but after much frustration I just can't seem to get it sorted out on my own. I have an original pink E02 Pogoplug with Optware and openssh installed on it as a file server on port 22222, and several laptops/netbooks with various versions of linux (using Crunchbang at the moment to write this).
The problem is that sshfs connects and works fine when I connect to the pogoplug as root, but fails with "remote host has disconnected" error when I attempt to connect as any other non-root user. Here's what I have tried thus far:
1. As per
this link, I verified that sftp-server is present at /opt/libexec/sftp-server and that in /opt/etc/openssh/sshd_config the following line is present and uncommented...
Subsystem sftp /opt/libexec/sftp-server
2. On advice from the same post, on the crunchbang client I typed...
Code:
ssh -p 22222 foobar@hostip /bin/true
and received a response...
Code:
foobar@hostip's password:
But it was advised "If the above command produces any output, then you need to modify your shell initialization." So as recommended I modified /home/foobar/.bash_profile to be...
Code:
if [ "$SSH_TTY" ]
then
source ~/.bash_profile_real
fi
and added file /home/foobar/.bash_profile_real as...
Code:
export PATH=/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin
echo "Completed bash_profile_real init!"
3. So here's the command that works...
Code:
sshfs -p 22222 -odebug,sshfs_debug,loglevel=debug root@192.168.1.100: ~/root_mountpoint
and the failing command...
Code:
sshfs -p 22222 -odebug,sshfs_debug,loglevel=debug foobar@192.168.1.100: ~/foobar_mountpoint
with associated debug output as follows...
Code:
SSHFS version 2.3
FUSE library version: 2.8.6
nullpath_ok: 0
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-oPort=22222> <-ologlevel=debug> <-2> <foobar@192.168.1.100> <-s> <sftp>
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.1.100 [192.168.1.100] port 22222.
debug1: Connection established.
debug1: identity file /home/foobar/.ssh/id_rsa type -1
debug1: identity file /home/foobar/.ssh/id_rsa-cert type -1
debug1: identity file /home/foobar/.ssh/id_dsa type -1
debug1: identity file /home/foobar/.ssh/id_dsa-cert type -1
debug1: identity file /home/foobar/.ssh/id_ecdsa type -1
debug1: identity file /home/foobar/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9
debug1: match: OpenSSH_5.9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.4
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: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: RSA e4:c0:9e:22:7a:25:3c:69:19:76:76:68:69:fd:27:b0
debug1: checking without port identifier
debug1: Host '192.168.1.100' is known and matches the RSA host key.
debug1: Found key in /home/foobar/.ssh/known_hosts:1
debug1: found matching key w/out port
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/foobar/.ssh/id_rsa
debug1: Trying private key: /home/foobar/.ssh/id_dsa
debug1: Trying private key: /home/foobar/.ssh/id_ecdsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
foobar@192.168.1.100's password:
debug1: Authentication succeeded (password).
Authenticated to 192.168.1.100 ([192.168.1.100]:22222).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
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: 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 1944, received 2000 bytes, in 0.1 seconds
Bytes per second: sent 21948.5, received 22580.8
debug1: Exit status 1
remote host has disconnected
My head's spinning at this point, so any advice would be kindly appreciated. Thanks in advance...8-]
-SteveD