Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As a university student, I am allowed to access my schools computers to work from home. However, it get there, i have to SSH to the university's general server, then SSH to the CIS departments server.

What I am trying to do is have access to the files on the CIS server that I can work on with a graphical text editor like gEdit.

In otherwords, I need to:

ssh -l username 



and I want to be mounted.

Any help would be greatly appreciated.

share|improve this question

migrated from Jan 13 '12 at 22:26

This question came from our site for system and network administrators.

It's a little inefficient (systems are working harder), but you could forward a port via SSH to the internal box. Use the following to forward whatever port SSH is running on the internal server to any high port on your local machine.

ssh -C -f -g -N -x -L<localport>:<internalserver>:<port_you_run_ssh_on> username@gateway

You can then use sshfs to mount localhost at localport.

That'll give you a background SSH connection. I usually make an alias for the first part (up to the -x) so I don't have to type them in every time I need to set up a connection.

Alternatively, you can just use the above to set up an SSH tunnel and then ssh with X forwarding, or transfer the file via sftp to your local machine and edit.

If you just need to edit text files, consider learning how to use a console-based text editor (like Vim or Emacs)--they're nice, powerful, and have GUI versions that you can use later. Then just edit directly on the remote system. I prefer Vim myself.

share|improve this answer

In the ssh config of your client build a configuration.

Host aliasforsystem
    ProxyCommand /usr/bin/ssh "/bin/netcat -w 1 22"

Then just ssh to aliasforsystem. You should be able to mount that aliasdirectly. If you have ssh keys setup then it should be really simple. You do need the general system to have netcat or something similar installed though.

You could also build tunnels starting one connection with a portforward to the internal box. Leave that open, and then connect to the internal system via the port forward.

share|improve this answer
The general server does not appear to have netcat installed. Could you list some alternatives that would work? – binaryOne Jan 13 '12 at 2:20
@binaryOne - You are a CS student I presume? Go download the netcat source, build it, & install it under your home directory. :-) (really, it's not as hard as you think it will be) – voretaq7 Jan 13 '12 at 22:15

You must log in to answer this question.