D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Back to front SSH connection?

 

On 26/03/2019 18:15, Grant Phillips-Sewell wrote:
> Hi all,
> 
> My brain is complete mush at the moment with the impending house move, 
> and my Google Fu is being affected accordingly.
> 
> A friend in Scotland has just installed Linux Mint on his laptop. What I 
> would like to do, if possible (I'm sure it is, and I'm sure I have a 
> vague recollection of doing precisely this many years ago) is for him to 
> run a command on his machine that establishes a connection to my machine 
> but allows me to run commands on his machine.
> 
> To my mind this would be a "reverse SSH connection" as his would be the 
> "server" (in as much as I would be running commands on it remotely) but 
> his would also be the one initiating the connection (like a "client" 
> would normally) so he doesn't have to mess around with port forwarding 
> nonsense.
> 
> I'm happy to (temporarily) set up pretty forwarding on my end to accept 
> his incoming connection, but importantly once he has established a 
> connection I want to have shell access on his machine rather than him 
> having shell access to mine.

I've had this bookmarked for years because every time I need to do it I 
need to refresh the exact steps...

https://www.howtoforge.com/reverse-ssh-tunneling

However, you're still going to need a common account on both machines 
and SSH forwarding through the router at his end which means you're 
going to have to send them instructions to follow either way before you 
can get in.

Cut out the in between step and just get them to install TeamViewer or 
whatever instead - it's less likely to go wrong and once you're in you 
can setup a 'proper' remote access protocol to your liking instead.

Cheers
-- 
The Mailing List for the Devon & Cornwall LUG
https://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq