I am trying to remotely connect to University to do some maths simulations, for which I am proceeding by...

ssh -X mouser@remoteIPaddress   


sftp mouser@remoteIPaddress     

All connections are okay, but the problem I have is that local is identical to remote. Hitting ls correctly lists the remote files in the current directory. However lls does not list the local files - it list the remote files.

Have I missed something out in connecting or is there a way I can resolve this so that local is actually local?


If you are running those two commands in sequence in the same terminal, what is happening is that you are sshing from your local machine into the host at remoteIPaddress, with X11 forwarding, and then, from an ssh session at remoteIPaddress, opening an interactive sftp session to the same host. To that sftp session, since it was originated within a shell at remoteIPaddress, that is the host considered to be local.

What you probably are intending to do is to open sftp from a second terminal on your actual local machine.

  • I understand, thank you very much for your help! Dec 9 '15 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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