1

Due to the COVID-19 crisis, I only have access to my work computer through ssh (so no physical access). Since I connect to this computer through another one that does not allow X forwarding, I can not forward X.

I now need to control an app that does not allow me to do so by just using the terminal.

The best option that comes to my mind (I accept suggestions) is using Remmina, but I need to be able to start it and configure it remotely through ssh with no GUI.

Whenever I try to start Remmina through ssh it throws an error due to unavailability of X forwarding.

Please note that I cannot connect directly to my work computer, I need to first ssh to another computer in the LAN and then ssh to my personal work computer. These are limitations imposed by the institutions, no personal computer can connect to the outside world. Therefore, if H is my home computer I have to connect through a computer B to my work computer W (H -> B -> W)

  • Isn't remmina a VNC client? wouldn't it be a VNC server (such as Vino) that you need to start and configure on the remote side? – steeldriver May 3 at 13:14
  • is TCP forwarding allowed on the first ssh hop ? then you could tunnel through with an SSH tunnel. – Robert Riedl May 26 at 8:45
  • @RobertRiedl I not quite sure. I have no permissions to see /etc/ssh/sshd_config in the second computer (B) – D1X May 26 at 8:49
  • on host B try ssh -L 10022:W:22 W. Then connect to B from Hwith ssh B -p10022. This should give you the login mask of W. This way, you tunnel through B. You can replace 1022with any port number higher than 1024 - though you might be restricted by your companies FW. Do you understand this concept ? – Robert Riedl May 26 at 8:59
  • @RobertRiedl Not really... A more detailed explanation would be highly appreciated. Thank you very much. – D1X May 26 at 9:01
0
+50

My understanding is that you were trying to execute Reminna on your target computer, i.e. W. That's not the way to do it.

Method #1

You need to

  1. change your W AND B computer settings to allow remote desktop connection
  2. Use a remote desktop client (e.g. Reminna) from your H computer, connect to B. You would see your desktop on B. Use Reminna (or any other remote desktop client) on B to connect to H.
  3. 3.

To enable Remote Desktop Connection on a host computer (here W, and B) from terminal you should do the following (assumign the hosts are also Ubuntu):

  1. Enable remote desktop sharing
  2. set the authentication method to vnc
  3. Restart lightdm
dconf write /org/gnome/desktop/remote-access/enabled true
dconf write /org/gnome/desktop/remote-access/prompt-enabled false
dconf write /org/gnome/desktop/remote-access/authentication-methods "['vnc']"
dconf write /org/gnome/desktop/remote-access/require-encryption false
sudo service lightdm restart

You may also want to disable lock on suspend and keep the screen live on the host computers:

dconf write /org/gnome/desktop/screensaver/lock-enabled false
dconf write /org/gnome/desktop/screensaver/ubuntu-lock-on-suspend false
dconf write /org/gnome/desktop/session/idle-delay "uint32 0"

Then on your client machine, (first on H, and then on B) use Reminna to connect to the host (H -> B, and then B -> W). Make sure that you set your Reminna connection to us VNC as protocol, and Enable SSH tunnel.

Method #2 The steps for setting the host W to share desktop is the same as before. The steps for using Reminna on H is also the same.

The alternative way is to configure your computer B to act as a Bridge Network Connection. This is advanced, unless you know what you are doing and you have the admin privilages, you should not do this. Or get help from your IT team. In case you want to try doing this, check this page.

| improve this answer | |
0

install vnc on your work computer (i did that to my vps) theres many tutorial on the net and i guess this is the perfect one for you. After installing it, you can connect to your work computer via vnc using remmina

| improve this answer | |
  • I cannot connect directly to my work computer, I need to first ssh to another computer in the LAN and then ssh to my personal work computer. It is unclear to me what IP should I use to connect when using the command ssh -L 5901:127.0.0.1:5901 -C -N -l sammy your_server_ip – D1X May 26 at 8:36

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.