LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2007, 08:05 PM   #1
beowulfnode
Member
 
Registered: Jun 2007
Distribution: debian, ubuntu, centos, esxi
Posts: 39

Rep: Reputation: 4
getting back disconnected remote session


I'm using Debian Sarge and logged into it remotely using PuTTY and SSH and was in the middle of using aptitude when I got disconnected.

My questions are
a) can I connect back to that session, or am I forced to just kill that session?
b) can those processes just be killed and I can just run aptitude again?

when I do
who
I get
myloginname pts/0 2007-06-29 21:59 (10.1.1.99)
myloginname pts/1 2007-06-30 09:13 (10.1.1.99)

pts/1 looks to be the 2nd remote session I'm logged in with and pts/0 is the one I want to get back to.

running a ps tree with
ps -ejH
(thanks to Google for that one) I get
{snip}
22941 22941 22941 ? 00:00:00 sshd
22943 22941 22941 ? 00:00:00 sshd
22945 22941 22941 ? 00:00:03 sshd
22946 22946 22946 pts/0 00:00:00 bash
22952 22952 22946 pts/0 00:00:00 bash
22956 22956 22946 pts/0 00:00:31 aptitude
12287 22956 22946 pts/0 00:00:04 dpkg
21140 22956 22946 pts/0 00:00:00 bash
21142 22956 22946 pts/0 00:00:00 pager
{snip}
19042 19042 19042 ? 00:00:00 sshd
21144 21144 21144 ? 00:00:00 sshd
21148 21144 21144 ? 00:00:00 sshd
21149 21149 21149 pts/1 00:00:00 bash
21280 21280 21149 pts/1 00:00:00 ps
{snip}
 
Old 06-30-2007, 05:41 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Afraid you can't. If the connection you're using is not
overly stable it may pay for you to use screen withing your
session, and do your work through that ... in case of an
unexpected event (e.g. a disconnect, or a local reboot)
you can easily re-attach afterwards.


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to initiate a remote session? dansawyer Linux - Software 1 06-20-2007 06:01 PM
sshfs error when mounting "remote host has disconnected" thew00t Linux - Server 3 04-14-2007 07:32 AM
Getting back the choose session type screen JerryP SUSE / openSUSE 1 07-20-2006 07:27 AM
Remote X Session Help implant25 Linux - Software 1 09-05-2005 09:39 AM
Remote acces to my x session eloicases Linux - Networking 2 06-15-2004 07:49 AM


All times are GMT -5. The time now is 04:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration