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


  Search this Thread
Old 03-19-2007, 06:27 PM   #1
LQ Newbie
Registered: Feb 2004
Distribution: Slackware 9.1 and BSD 5.2
Posts: 28

Rep: Reputation: 16
Question sshfs error when mounting "remote host has disconnected"

Hi all, recently a server I maintain running
$ cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 4)

with kernel version
$ uname -r

and I've been trying to connect from a remote host with sshfs command:
$ sudo sshfs /mount/point

and immediately after entering my sudo'er password, I get
remote host has disconnected

if I pass -1 and -d like so
$ sudo sshfs /mount/point -1 -d

then I get promted for a password as I should, but upon entering the proper password I get booted with the same error. strace doesn't seem to help much:

$ sudo strace sshfs /mount/point -1 -d
... (cut off the beginning of output
set_tid_address(0xb7dba6f8)             = 7081
rt_sigaction(SIGRTMIN, {0xb7f8f720, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb7f8f640, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbfc57100, 34, (nil), 0}) = 0
brk(0)                                  = 0x8053000
brk(0x8074000)                          = 0x8074000
gettimeofday({1174342571, 232739}, NULL) = 0
pipe([3, 4])                            = 0
pipe([5, 6])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7dba6f8) = 7082
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(7082, NULL, 0)                  = 7082
close(4)                                = 0
close(5)                                = 0
writev(6, [{"\0\0\0\5\1\0\0\0\3", 9}], 1) = 9
read(3,'s password: 
"", 5)                          = 0
write(2, "remote host has disconnected\n", 29remote host has disconnected
) = 29
exit_group(1)                           = ?
any thoughts? I know I can SSH/SFTP to the host fine, and I know that the source dir and the target mountpoint both exist
Old 03-19-2007, 08:58 PM   #2
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,037

Rep: Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912Reputation: 1912
Done any maint on that box ???. Maybe the sshd_config has been reset to the default.
(Don't know how RHEL works, so this may be irrelvant).
Old 03-19-2007, 09:16 PM   #3
LQ Newbie
Registered: Feb 2004
Distribution: Slackware 9.1 and BSD 5.2
Posts: 28

Original Poster
Rep: Reputation: 16
Oh yes, the system was recently wiped but I made sure that sshd_config had the right path to the sftp subsystem. Are there other directives I should have in my config? Here is what it says:
#       $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 markus Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
LogLevel INFO

# Authentication:

LoginGraceTime 2m
PermitRootLogin no
#StrictModes yes

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCreds yes

# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication'
#UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/
#MaxStartups 10

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem       sftp    /usr/libexec/openssh/sftp-server
Old 04-14-2007, 07:32 AM   #4
LQ Newbie
Registered: Apr 2007
Posts: 1

Rep: Reputation: 0
Try running sshfs with the sshfs debug option:

"(sudo) sshfs (-o allow_other) -o sshfs_debug user@computer:/mountpoint /localmountpoint"

See if there is any problem with RSA/DSA keys. If you changed things on the server, keys may have changed.

If so, in the client, edit /root/.ssh/known_hosts and remove the line in which the server key appears. Or simply remove the entire file if you can't find the specific line.

Then try sshfs again, it will prompt you to accept the server's key.

This happened to me, and until I didn't use the debug option I didn't see my mistake.

Good luck!


error, sshfs

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ping error "Destination Host Unreachable" from the gateway cristi_ro Linux - Networking 4 10-30-2006 05:32 PM
startx fail , error shown "hostname: Unknown host " syseeker Red Hat 4 07-05-2006 12:40 PM
ssh "remote host identification has changed" dave`2005 Slackware 3 06-23-2006 04:21 PM
FTP problem "connection closed by remote host" with RHEL4 and Windows 2003 hooijack Linux - Enterprise 0 03-23-2006 10:29 PM
Mandrake 10.0 Network Install "Error: Bad Host Name" tonylmiller Mandriva 3 05-29-2004 07:44 AM

All times are GMT -5. The time now is 11:01 AM.

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