Re: Reconnect to a specific TTY session?

2007-03-27 Thread Atis

Then the dropped ssh connection had not caused the ssh daemon to terminate
yet, and the screen session was still attached...  usually screen only
offers to reattach detached sessions.


Well, that's the point of screen, it doesn't terminate when parent
terminates. Plus you can detach screen that is running with -d, and
attach it back with -r

Regards,
Atis


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Reconnect to a specific TTY session?

2007-03-27 Thread Chris Bannister
On Mon, Mar 26, 2007 at 06:48:00PM -0400, Jim Hyslop wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Henrique de Moraes Holschuh wrote:
  Not even screen -rda  worked?
 
 Woohoo! That's got it, thanks.
 
 Now I just have to remember to use screen whenever I'm about to do
 anything I don't want disconnected :-)

Have a look at /etc/screenrc, at the very end are some examples.
For per user settings use .screenrc

If you use the command line a lot for certain applications, why not put
them in your .screenrc and run screen all the time. If you log in and
often and think you might forget then put screen on a line on its own at
the end of your .bash_profile + .bashrc files. You can always quit it
with ctrl-a \ if need be.

-- 
Chris.
==
Don't forget to check that your /etc/apt/sources.lst entries point to 
etch and not testing, otherwise you may end up with a broken system once
etch goes stable.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Reconnect to a specific TTY session?

2007-03-26 Thread Micha Feigin
On Sun, 25 Mar 2007 22:42:38 -0300
Henrique de Moraes Holschuh [EMAIL PROTECTED] wrote:

 On Sun, 25 Mar 2007, Jim Hyslop wrote:
  Yes, that's what I did. I started an ssh session, ran 'screen', and
  launched a program (man screen, IIRC). I got two or three screens
  running, and was able to switch between them.
  
  Then I put my laptop into standby, and brought it out, which forced the
  connection to be dropped. When I started the second ssh session, I got
  the above error message.
 
 Not even screen -rda  worked?
 

It's been some time since I used screen so I'm not sure what the above options
are, but your problem is that you start screen in the shell and when ssh dies
the shell dies and takes with it all it's children.

One solution I can think of is to start screen as a background process (server
screen). Not sure if 'screen ' is enough or you may need to use the 'at'
command. You can then start another screen session to connect to the original.
This one will die on exit but leave the master running.

There may may be a command line option for this, possibly then one mentioned
above (I don't have it installed at the moment so I can't check)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Reconnect to a specific TTY session?

2007-03-26 Thread Jim Hyslop
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Henrique de Moraes Holschuh wrote:
 Not even screen -rda  worked?

Woohoo! That's got it, thanks.

Now I just have to remember to use screen whenever I'm about to do
anything I don't want disconnected :-)

- --
Jim Hyslop
Dreampossible: Better software. Simply. http://www.dreampossible.ca
 Consulting * Mentoring * Training in
C/C++ * OOD * SW Development  Practices * Version Management
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFGCE2gLdDyDwyJw+MRAtpSAJ9i1H1majbVxElOZtqqZIdFhKyXKgCgtAOT
/z+qyVY9p4OX6yTcc8zSVRA=
=tZuQ
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Reconnect to a specific TTY session?

2007-03-26 Thread Jim Hyslop
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Kamaraju S Kusumanchi wrote:
 Is there any firewall between the server and the client? If so, the firewall
 might be switching off the idle ssh connections. If this infact is your
 problem, to keep the ssh connections alive use ServerAliveInterval option
 in your ~/.ssh/config . More info can be found at the man page of
 ssh_config.

Thanks for the tip, Raju. There's no firewall involved, though - it
happens when my laptop goes into standby. Both computers are on the
same, internal router.

Jeff and Henrique's suggestion of using 'screen' worked (once I got the
right combination of options to use).

- --
Jim Hyslop
Dreampossible: Better software. Simply. http://www.dreampossible.ca
 Consulting * Mentoring * Training in
C/C++ * OOD * SW Development  Practices * Version Management
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFGCE4lLdDyDwyJw+MRAnn9AJ9WfDG+pepCx+LsqbLHMeJiKlHa+gCgv5AA
7kFvdftgh0VVKuURByipFWo=
=+hbg
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Reconnect to a specific TTY session?

2007-03-26 Thread Henrique de Moraes Holschuh
On Mon, 26 Mar 2007, Jim Hyslop wrote:
 Henrique de Moraes Holschuh wrote:
  Not even screen -rda  worked?
 
 Woohoo! That's got it, thanks.

Then the dropped ssh connection had not caused the ssh daemon to terminate
yet, and the screen session was still attached...  usually screen only
offers to reattach detached sessions.

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Reconnect to a specific TTY session?

2007-03-25 Thread Andy Smith
On Sat, Mar 24, 2007 at 08:50:59PM -0400, Jim Hyslop wrote:
 Henrique de Moraes Holschuh wrote:
  but you
  might want to look at the screen program (see package screen) for the
  next time you need terminals you want to reattach to.
 Thanks for the suggestion. It didn't work, unfortunately. 'screen -r
 pts-0.sirius' returns the error There is no screen to be resumed
 matching pts-0.sirius.

You need to run screen *before* your laptop goes into sleep mode,
i.e. you can only re-attach to pre-existing screens.

Cheers,
Andy

-- 
http://bitfolk.com/ -- No-nonsense VPS hosting
Encrypted mail welcome - keyid 0x604DE5DB


signature.asc
Description: Digital signature


Re: Reconnect to a specific TTY session?

2007-03-25 Thread Celejar
On Fri, 23 Mar 2007 16:52:25 -0400
Jim Hyslop [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi, gang
 
 I suspect I know the answer to this, but I'm going to ask anyway :-)
 
 When I ssh into my Debian box from my laptop, sometimes I step away from
 the laptop, and when I come back it's gone into standby. This, of
 course, drops the TCP/IP connection to the Debian box. Is there any way
 to re-establish the connection to the session I was running? If I try
 ssh again, I get a new TTY session.

You want screen [0].

Celejar

[0] http://www.kuro5hin.org/story/2004/3/9/16838/14935
http://www.linuxjournal.com/article/6340


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Reconnect to a specific TTY session?

2007-03-25 Thread Jim Hyslop
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andy Smith wrote:
 On Sat, Mar 24, 2007 at 08:50:59PM -0400, Jim Hyslop wrote:
Thanks for the suggestion. It didn't work, unfortunately. 'screen -r
pts-0.sirius' returns the error There is no screen to be resumed
matching pts-0.sirius.
 
 
 You need to run screen *before* your laptop goes into sleep mode,
 i.e. you can only re-attach to pre-existing screens.

Yes, that's what I did. I started an ssh session, ran 'screen', and
launched a program (man screen, IIRC). I got two or three screens
running, and was able to switch between them.

Then I put my laptop into standby, and brought it out, which forced the
connection to be dropped. When I started the second ssh session, I got
the above error message.

- --
Jim Hyslop
Dreampossible: Better software. Simply. http://www.dreampossible.ca
 Consulting * Mentoring * Training in
C/C++ * OOD * SW Development  Practices * Version Management
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFGBvG/LdDyDwyJw+MRAlJHAKClbMWM99TFJuamBhAPYmAG7b6M6wCeJ4Fn
tQsQaD8dd6r7QZito+WZYyA=
=52kz
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Reconnect to a specific TTY session?

2007-03-25 Thread Henrique de Moraes Holschuh
On Sun, 25 Mar 2007, Jim Hyslop wrote:
 Yes, that's what I did. I started an ssh session, ran 'screen', and
 launched a program (man screen, IIRC). I got two or three screens
 running, and was able to switch between them.
 
 Then I put my laptop into standby, and brought it out, which forced the
 connection to be dropped. When I started the second ssh session, I got
 the above error message.

Not even screen -rda  worked?

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Reconnect to a specific TTY session?

2007-03-25 Thread Kamaraju S Kusumanchi
Jim Hyslop wrote:

 When I ssh into my Debian box from my laptop, sometimes I step away from
 the laptop, and when I come back it's gone into standby. This, of
 course, drops the TCP/IP connection to the Debian box. Is there any way
 to re-establish the connection to the session I was running? If I try
 ssh aga

Is there any firewall between the server and the client? If so, the firewall
might be switching off the idle ssh connections. If this infact is your
problem, to keep the ssh connections alive use ServerAliveInterval option
in your ~/.ssh/config . More info can be found at the man page of
ssh_config.

hth
raju


-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Reconnect to a specific TTY session?

2007-03-24 Thread Jim Hyslop
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Henrique de Moraes Holschuh wrote:
 On Fri, 23 Mar 2007, Jim Hyslop wrote:
 
course, drops the TCP/IP connection to the Debian box. Is there any way
to re-establish the connection to the session I was running? If I try
ssh again, I get a new TTY session.
 
 
 I don't know if you can reconnect to the old tty (if ssh noticed the
 connection went away it should SIGTERM its children, anyway...)
That's a good point - does this mean my sshd is mis-configured?

 but you
 might want to look at the screen program (see package screen) for the
 next time you need terminals you want to reattach to.
Thanks for the suggestion. It didn't work, unfortunately. 'screen -r
pts-0.sirius' returns the error There is no screen to be resumed
matching pts-0.sirius.

- --
Jim Hyslop
Dreampossible: Better software. Simply. http://www.dreampossible.ca
 Consulting * Mentoring * Training in
C/C++ * OOD * SW Development  Practices * Version Management
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFGBcdYLdDyDwyJw+MRAoSPAKCrs+vDKDu2MpFyMsHKB+ENcHgMhwCg0a0X
e+6OSaUYaiIO5V45Yf3zpQo=
=2pv6
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Reconnect to a specific TTY session?

2007-03-23 Thread Jim Hyslop
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi, gang

I suspect I know the answer to this, but I'm going to ask anyway :-)

When I ssh into my Debian box from my laptop, sometimes I step away from
the laptop, and when I come back it's gone into standby. This, of
course, drops the TCP/IP connection to the Debian box. Is there any way
to re-establish the connection to the session I was running? If I try
ssh again, I get a new TTY session.

- --
Jim Hyslop
Dreampossible: Better software. Simply. http://www.dreampossible.ca
 Consulting * Mentoring * Training in
C/C++ * OOD * SW Development  Practices * Version Management
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFGBD4JLdDyDwyJw+MRAkGXAKD5Hf3f/AJWeg2B1p5VgHNmH9NJQACg6jac
k1AqftzH0qJIMV4nFkqFL4c=
=QMaK
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Reconnect to a specific TTY session?

2007-03-23 Thread Jeff D

On Fri, 23 Mar 2007, Jim Hyslop wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi, gang

I suspect I know the answer to this, but I'm going to ask anyway :-)

When I ssh into my Debian box from my laptop, sometimes I step away from
the laptop, and when I come back it's gone into standby. This, of
course, drops the TCP/IP connection to the Debian box. Is there any way
to re-establish the connection to the session I was running? If I try
ssh again, I get a new TTY session.

- --
Jim Hyslop
Dreampossible: Better software. Simply. http://www.dreampossible.ca


well, not directly answering your questing, but, one thing you could start 
to do, is run screen on the debian box.  that way you can always use that 
to get to your last session your last one ..



 ---
Human beings were created by water to transport it uphill.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Reconnect to a specific TTY session?

2007-03-23 Thread Henrique de Moraes Holschuh
On Fri, 23 Mar 2007, Jim Hyslop wrote:
 course, drops the TCP/IP connection to the Debian box. Is there any way
 to re-establish the connection to the session I was running? If I try
 ssh again, I get a new TTY session.

I don't know if you can reconnect to the old tty (if ssh noticed the
connection went away it should SIGTERM its children, anyway...), but you
might want to look at the screen program (see package screen) for the
next time you need terminals you want to reattach to.

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]