从Mac挂载sshfs的linux目录停止工作


12

直到今天早上,我一直很好地使用sshfs从办公室中的linux机器挂载目录。今天,它停止了。这是我的sshfs命令:

sshfs -osshfs_sync,volname=linux-builder3 linux-builder3:/home/cnorum /Users/carl/linux-builder3

我收到此错误,但是sshfs进程似乎仍在运行(也就是说,它只是坐在那里,从未返回到shell提示符):

mount_osxfusefs: failed to mount /Users/carl/linux-builder3@/dev/osxfuse1: Socket is not connected

Mac上的系统日志包含以下消息:

2/20/13 12:57:27.476 PM KernelEventAgent[43]: tid 00000000 received event(s) VQ_DEAD (32)
2/20/13 12:57:27.000 PM kernel[0]: OSXFUSE: force ejecting (no response from user space 5)
2/20/13 12:57:27.000 PM kernel[0]: OSXFUSE: user-space initialization failed (57)

这是/var/log/auth.log在Linux机器上:

Feb 20 12:56:28 linux-builder3 adclient[1599]: INFO  <fd:22 PAMIsUserAllowedAccess> audit User 'cnorum' is authorized
Feb 20 12:56:28 linux-builder3 sshd[29648]: Accepted publickey for cnorum from 10.0.40.65 port 49850 ssh2
Feb 20 12:56:28 linux-builder3 sshd[29648]: pam_unix(sshd:session): session opened for user cnorum by (uid=0)
Feb 20 12:56:28 linux-builder3 sshd[29729]: subsystem request for sftp

sshfs与其他机器(在我的情况下为linux-builder和linux-builder2)的连接似乎很好。有人对哪里出了问题以及如何解决有什么建议吗?我可以获取您可能想要查看的任何日志!

Answers:


4

对于未来的Google员工,我收到了这个神秘的错误,并意识到我提供给sshfs的路径不存在。哎呀 修复它,我离开了。

mount_osxfusefs: failed to mount /Volumes/mypath@/dev/osxfuse0: Socket is not connected

这与我的问题非常相似-主机地址中有错字!谢谢!
IanW

同样,我认为我可以.ssh/config/etc/fstab定义中使用主机同义词,而无需指定IdentifyFile=~/.ssh/id_rsa。足以说我很误会!对于Google员工,我(至少)在我的系统日志中收到了一条简短的消息:OSXFUSE: user-space initialization failed (57)
哈哈

1
注意:在Mac上,〜/是/ Users / username /,但是linux计算机可能有/ home / username /。一旦我改变sshfs server:~/ ~/mnt_fldr/sshfs server:/home/username/ /Users/username/mnt_fldr/它的工作。
David Oneill

同样,如果无法连接远程服务器,则可能导致此错误。
加文·扬西

2

我认为它是固定的。我.bashrc在linux盒子上有这行:

CLIENT_PATH_PREFIX="$(ssh ${CLIENT_ADDR} 'echo ${SSHFS_PATH_PREFIX}')/$(hostname)/$(whoami)"

它不需要由非交互式shell运行,所以我将其推到了另一个文件中,现在更好了。我真的不明白为什么,但是我很高兴它能起作用。


0

我的问题是主机的RSA主机密钥已更改,因此我必须运行

ssh-keygen -R site.com

0

对我来说,问题在于known_hosts

当我尝试通过SSH进入服务器时,收到以下消息:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:<something>
Please contact your system administrator.
Add correct host key in /Users/myuser/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/myuser/.ssh/known_hosts:86
RSA host key for <server> has changed and you have requested strict checking.
Host key verification failed.

删除有问题的密钥(只要您信任服务器),就可以解决此问题。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.