Hi there Is it possible to configure ssh so that a session can continue/recover after a change of IP? I have a number of static IP dialup accounts and there is no problem using these because when my dialup connection timesout and later reconnects, it gets the same IP and so any existing ssh sessions are unaffected. However, these accounts with static IP's are metered (i.e. expensive ;-). Much better are the unmetered (here in the UK, either FRIACO or Surftime) dialups but these use dynamic IP's. So after a timeout and reconnect, existing sessions break ;-( Any solution? TIA *************************************************** John Sutton SCL Internet URL http://www.scl.co.uk/ Tel. +44 (0) 1239 711 888 ***************************************************
you have to use some kind of ip tunneling, like ipsec or mobile ip. On Fri, Apr 11, 2003 at 12:50:19PM +0100, John Sutton wrote:> Hi there > > Is it possible to configure ssh so that a session can continue/recover > after a change of IP? > > I have a number of static IP dialup accounts and there is no problem using > these because when my dialup connection timesout and later reconnects, it > gets the same IP and so any existing ssh sessions are unaffected. > > However, these accounts with static IP's are metered (i.e. expensive ;-). > Much better are the unmetered (here in the UK, either FRIACO or Surftime) > dialups but these use dynamic IP's. So after a timeout and reconnect, > existing sessions break ;-( > > Any solution? > > TIA > > *************************************************** > John Sutton > SCL Internet > URL http://www.scl.co.uk/ > Tel. +44 (0) 1239 711 888 > *************************************************** > > _______________________________________________ > openssh-unix-dev mailing list > openssh-unix-dev at mindrot.org > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev >
On Fri, 11 Apr 2003, David Woodhouse wrote:> On Fri, 2003-04-11 at 12:50, John Sutton wrote: > > Is it possible to configure ssh so that a session can continue/recover > > after a change of IP? > > man screen > > Other than that, no.I can't see how using screen gets me any further? Surely screen just allows multiple sessions multiplexed into one tty stream (badly put but I think I know what I mean ;-). End result will be that *all* the sessions get broken on a change of IP?> > Any solution? > > Avoid changing the IP address you use for the connection, by tunnelling > from your dynamic dialup address to somewhere else, and effectively > giving yourself a static IP address?This is an intriguing notion... Markus Friedl (see other post) has suggested the same. I have limited experience with tunnelling protocols (I messed around with pptp bewteen linux and windoze boxes some years ago) but I can't immediately see how this could work. Surely to set up an IP tunnel of any sort you have got to have two "fixed" endpoints? OTOH, I can see how you *might* have a "lightweight, non-encrypted" tunnelling protocol which *is* impervious to change of IP. Then you could run an ssh session through this tunnel. Quite how the server end of the tunnel would recognise that this "new" connection was actually an existing connection which had changed it's IP and therefore be able to tie the 2 ends back together, I don't know... Does this make any sense?> This is being sent from an unmetered static IP dialup in the UK though. > Not that it's not expensive, mind you :)How expensive is that? The minimum I've found is ?51+vat per month (for 300 hours per month) single channel ISDN. I consider this *too* expensive so I've gone back to using a dynamic dialup for ?11+vat ;-( *************************************************** John Sutton SCL Internet URL http://www.scl.co.uk/ Tel. +44 (0) 1239 711 888 ***************************************************
<http://www.cs.wisc.edu/~zandy/rocks/> is a library which provides 'reliable sockets' which stay open through a change of IP address. You need to modify both the ssh client and server to use this library. However I can strongly recommend the suggestion others have made: use screen(1). Every time you log in, say % exec screen -e '^Z^Z' -D -R This will make a new session, or reconnect to an existing session. Press C-z c to make a new virtual terminal, then C-z 0, C-z 1, C-z 2 etc to switch between terminals. C-z d to disconnect. But this is getting off topic. -- Ed Avis <ed at membled.com>