Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to access my work computer from home. We are supposed to SSH into a server, say ssh.company.com and from there ssh into an xhost to to work, say xhost04.company.com. xhost04 is not directly accessible. How can I browse files on xhost04 from my home computer using nautilus (in ubuntu) with SSHFS.

To access the SSH host I would use:

ssh -t -X ssh.company.com ssh -X internalserver

How do I modify this for SSHFS? Without the double tunneling I have the following:

sshfs user@ssh.company.com: ~/far_projects
share|improve this question
The issue with sshfs for achieving this is that sshfs uses the sftp subsystem and cannot execute any command. See my top-voted response on this question: serverfault.com/questions/158392?tab=votes#tab-top –  Weboide Jul 20 '10 at 0:50
I have looked at the link you provided but I'm sorry I'm pretty new and I don't know how to use that for my needs. I'm not trying to sudo over ssh, I'm not sure how it applies to my situation. Could provide me with an example command line solution using the example servers ssh.company.com and xhost04.company.com? –  D W Jul 20 '10 at 18:56

1 Answer 1

up vote 2 down vote accepted

Install nc on ssh.company.com, and set up a stanza in ~/.ssh/config as follows:

Host internalserver
    ProxyCommand ssh user@ssh.company.com nc internalserver 22

Then connect to internalserver with the user of your choice.

share|improve this answer
Sorry, I'm pretty new to some of this stuff. What is nc? I'm not sure that I have permission to install anything on ssh.company.com, is there a way to avoid this? –  D W Jul 20 '10 at 18:49
Typically nc is pre-installed on many servers –  Slava N May 20 '11 at 4:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.