1

I have installed Linux for someone (in fact, for many people, but never mind). She has the computer running at home. I wish to assist her by entering some commands as root in her shell, typing on my keyboard. I have a Linux computer running at home, too, and a server on the internet. We can both contact the server but there is no open port to connect from the server to one of the computers (and it should stay that way).

How can she connect to the server, and I connect to it - both with ssh I suppose - such that I can enter commands in a shell on her computer?

I can run any ssh command on the server since I am root there. I do have her root password, too (and my pubkey is in her /root/.ssh/authorized_keys). This is for a one-off remote assistance job, no permanent connection is needed. Her interaction is available by mail/phone but she cannot enter the complex commands needed for efficient and effective remote assistance.

2

This has to be done in two steps. First you need IP access to her system. That can be done by her making an SSH connection to your server with port forwarding:

ssh -R localhost:2222:localhost:22 user@server

After that you can connect on the server to localhost:2222 and reach port 22 on her system.

The second step is that an SSH server must run on her side so that you can login.

You can use screen or tmux so that you share a terminal and she can see what you do.

  • Thanks. It may take a while for me to test this setup but if it works I will of course mark this answer as such. If you understood my question feel free to vote it up... – Ned64 Aug 30 '17 at 17:19

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.