I tried to start gedit
on one of my servers by running: `ssh test@test-server gedit and it runs, but it displays the filesystem of my server and not my local system.
How can I get gedit
to show my local filesystem?
I tried to start gedit
on one of my servers by running: `ssh test@test-server gedit and it runs, but it displays the filesystem of my server and not my local system.
How can I get gedit
to show my local filesystem?
What you want to do there is not possible.
You are probably using an X11 forward and here you need to understand, that the process of Gedit itself starts on the server, and its only a projection of the application that you see (like a video on youtube, with the only difference that this one responds to your actions). For this particular reason it no wonder that you aren't able to see your local files.
There is a workaround, but it also doesn't do exactly what you want to achieve. You could make a reverse tunnel to your local machine, and then use sshfs to bind one of your local folders (or the entire filesystem) on the remote server.
On your local host:
ssh -R 2222:localhost:22 user@remotehost
On the remote host:
sshfs -o port=2222 localhost:/path/on/your/pc /path/to/bind/folder/on/server
This might be confusing, but what it does is as follows:
You make a reverse ssh tunnel from your local pc to the remote server. After that you connect to your pc from the remote server through that tunnel, to get to your data you want to edit with gedit.
So now we know this works, but I beg you not to use it.