You are not logged in.

#1 2015-07-26 20:10:46

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

[Solved] sshfs - connection reset by peer, ssh - works

As topic says, I can still log into my server via ssh,

# ssh -p 12345 -c arcfour 192.168.0.2
Last login: Sun Jul 26 21:48:52 2015 from 192.168.0.4

but attempting to mount sshfs mounts result in

# mount -t fuse.sshfs -o idmap=user,port=12345,_netdev,identityfile=/root/.ssh/id_rsa,allow_other,default_permissions,uid=1000,gid=1000,umask=0,reconnect,cache=no,kernel_cache,ciphers=arcfour,compression=no 192.168.0.2:/var/cache/pacman/pkg  /mnt/pkgcache
read: Connection reset by peer

There is no indication of any error in the remote journal. Local journal reads

systemd[1]: mnt-pkgcache.automount: Got automount request for /mnt/pkgcache, triggered by 970 (dolphin)
systemd[1]: Mounting /mnt/pkgcache...
systemd[1]: Mounted /mnt/pkgcache.
mount[5023]: read: Connection reset by peer
systemd[1]: mnt-pkgcache.mount: Mount process exited, code=exited status=1
systemd[1]: mnt-pkgcache.mount: Unit entered failed state.

Switching to cifs mounts works as expected. I've seen some topics about the issue on the forums, but for all of them SSH didn't work either.
The most puzzling thing is that it just stopped working, without me changing anything relevant. About the only thing I changed is moving my /home/user to another partition.
I don't see how that could affect my root user sshfs mount, considering root's home is in /root, and even then, if I somehow damaged the rsa keys, then SSH wouldn't work either...

Both PCs run openssh 6.9p1-2, which is up-to-date. Any ideas?

edit: I have seen this wiki entry, adding sshfs_debug doesn't give more info. Rest of the suggestions don't apply either.

Last edited by Soukyuu (2015-07-26 20:53:43)


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#2 2015-07-26 20:53:24

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: [Solved] sshfs - connection reset by peer, ssh - works

So, adding "debug" in addition to "sshfs_debug" option helped me solve it:

Bad owner or permissions on /root/.ssh/config

Turns out sshfs does not like that file being a symlink for root, while it's all fine for a user.
The confusing part (for me) was that non-root mounts failed as well - but now that I think about it, the fstab mounts are mounted by root anyway, so it's obviously reading the root config, not my user's.

In any case, I restored the file to being a regular file and it works now. I think I will add the part about "debug" to the wiki.


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

Board footer

Powered by FluxBB