-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi folks,
I'm in need of some wizardry.
I have a machine at home that's connected to the telly so that the wife can use it for Skype (just bought a *really* nice HD webcam) and browsing etc (and I can use it for Steam ;)
What I need is for it to ssh to my server when it boots and open a port there to its local sshd so that I can ssh into it whenever I need. I'm on an ISP that will change my IP address every now and then and I don't want to muck about with dyndns etc. so this is my preferred solution.
I know how to do the ssh bit: ssh -R 2222:localhost:22 server
What I don't know is how to make it do that when it boots - obviously when the wifi gets around to connecting - and to make it resilient to drop outs, i.e. reconnect if the connection is lost.
Any ideas?
Cheers, Steve
On Thu, 13 Mar 2014 11:57:39 +0000 Steve Engledow steve@offend.me.uk wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi folks,
I'm in need of some wizardry.
I have a machine at home that's connected to the telly so that the wife can use it for Skype (just bought a *really* nice HD webcam) and browsing etc (and I can use it for Steam ;)
What I need is for it to ssh to my server when it boots and open a port there to its local sshd so that I can ssh into it whenever I need. I'm on an ISP that will change my IP address every now and then and I don't want to muck about with dyndns etc. so this is my preferred solution.
I know how to do the ssh bit: ssh -R 2222:localhost:22 server
What I don't know is how to make it do that when it boots - obviously when the wifi gets around to connecting - and to make it resilient to drop outs, i.e. reconnect if the connection is lost.
Any ideas?
As the resident numpty here, I would set the IP address of the tv machine on the router so that it gets the same IP address whenever it starts. So you wouldn't have to change anything on the machine, just the router.
Tha's what I've done with my Pi (see my Owncloud question earlier) so that I can ssh into that on the same IP address.
You said that your ISP will change your IP address but surely that's only internet facing address and not the internal one.
Or is that not what you want to do?
On Thu, 13 Mar 2014 11:57:39 +0000 Steve Engledow steve@offend.me.uk allegedly wrote:
I have a machine at home that's connected to the telly so that the wife can use it for Skype (just bought a *really* nice HD webcam) and browsing etc (and I can use it for Steam ;)
Skype? *Skype*??? Oh well....
What I don't know is how to make it do that when it boots - obviously when the wifi gets around to connecting - and to make it resilient to drop outs, i.e. reconnect if the connection is lost.
You could setup a script in /etc/network/if-up.d to start the ssh process when TCP is up on an interface. And I think that autossh might help with the second problem (drops).
Mick
---------------------------------------------------------------------
Mick Morgan gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312 http://baldric.net
---------------------------------------------------------------------
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2014-03-13 12:30, mick wrote:
Skype? *Skype*??? Oh well....
I know. I've tried converting her family to other things but Skype is just so prevalent :(
And I think that autossh might help with the second problem (drops).
Yes indeed. In fact, shortly after I sent my mail I stumbled upon autossh.
As an Arch user, I checked the arch wiki and there's a decent write up there including how to get it working in systemd which I've now done.
https://wiki.archlinux.org/index.php/Secure_Shell#Autossh_-_automatically_re...
Mission accomplished :)
Steve
On Thu, 13 Mar 2014 13:44:26 +0000 Steve Engledow steve@offend.me.uk allegedly wrote:
As an Arch user, I checked the arch wiki and there's a decent write up there including how to get it working in systemd which I've now done.
https://wiki.archlinux.org/index.php/Secure_Shell#Autossh_-_automatically_re...
That's good.
I get more and more impressed by the Arch wiki every time I read something there. Even as a debian user I find it useful (and comprehensive).
Mick
---------------------------------------------------------------------
Mick Morgan gpg fingerprint: FC23 3338 F664 5E66 876B 72C0 0A1F E60B 5BAD D312 http://baldric.net
---------------------------------------------------------------------