I am executing all my code on a remote machine. I mounted the remote filesystem using sshfs on my laptop, so I can use my own preferred text editors and such. I.e. in my terminal window I run an ssh session where I enter my commands, and in my local editor I have a mounted file opened.
The only tedious thing is that every time I want to open a file or directory, I have to navigate all the way to the local mounted directory in a new terminal window.
Is there a neat way I can define a command / keyboard shortcut so that I can immediately open a local file/directory from my ssh session?
I thought of:
- A script that sends a command via ssh to my own laptop from the remote
- Somehow using the pasteboard (doing pwd on the remote, copying that to the pasteboard, translate it to a path to the local mounted filesystem)
- Using applescript (since I am working on a Mac) and making a new service for the Terminal.app
but so far I have not been able to solve the problem.
ssh -t user@ipaddress '/pathtothescript'
? – LinuxSecurityFreak Aug 4 '16 at 6:53ssh
-ed to need to get involved? – JigglyNaga Aug 4 '16 at 7:13