LinuxQuestions.org
Review your favorite Linux distribution.
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-01-2009, 03:59 AM   #1
chaitanya1982
LQ Newbie
 
Registered: Apr 2008
Posts: 23

Rep: Reputation: 15
connecting to already existing consoles using putty


Hi,

I have a question. I had connected to one linux machine using putty. While working the network was went down. Again I connected to the same machine after some time.

Now I want to connect to my previous session which was opened in last time. The out put of the w command showing that the console is running. Is there any way to switch between those console which are already opened.
Please help in this regard. The W command output is as follows. Thanks in advance.
[root@fedora35 ~]# w
04:41:46 up 11 days, 50 min, 4 users, load average: 0.09, 0.03, 0.20
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 :0.0 21May09 5days 0.08s 0.08s bash
root pts/1 :0.0 21May09 6days 53.05s 0.40s bash
root pts/2 192.168.230.155 02:17 1:49m 0.07s 0.02s vi runsed
root pts/3 192.168.230.155 04:36 1.00s 0.03s 0.00s w
 
Old 06-01-2009, 04:03 AM   #2
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 572

Rep: Reputation: 56
No. If you want to be able to do this, then when you first connect from your remote location, you should immediately run "screen". This will keep your session active through network disconnects and allow you to resume any detached sessions from any location (not necessarily from where you were).
Code:
man screen
Your current sessions can't be recovered.
 
Old 06-01-2009, 04:25 AM   #3
chaitanya1982
LQ Newbie
 
Registered: Apr 2008
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks for your reply.

I ran screen command now. If again it disconnects, How can I connect to my previous session.
 
Old 06-01-2009, 04:50 AM   #4
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 572

Rep: Reputation: 56
Read the man page as suggested (at the prompt, enter "man screen").

A short intro:-
1. To detach from an existing screen session, press Control-A followed by D.
2. To see which screens you have running, type "screen -ls".
3. If you only have one detached screen, use "screen -r" to resume it.
4. If you have more than one, the use "screen -r <screen-name>" where <screen-name> is replaced by the screen named returned from "screen -ls".

Again, read the man page!
 
Old 06-01-2009, 04:54 AM   #5
chaitanya1982
LQ Newbie
 
Registered: Apr 2008
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks for your reply. I will try this.
 
  


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
PuTTy not connecting to RH 2.4.21-ELsmp bangulu Linux - Newbie 2 05-10-2007 03:39 AM
Should I be worried - version of putty connecting on telnet ganz_friedrich Linux - Security 8 01-16-2006 10:52 AM
connecting through a 'putty' type system airswit Linux - Software 6 12-05-2005 11:55 AM
connecting to an existing session arichardson Fedora 1 11-21-2005 12:33 PM
Using putty on windows connecting to Linux newlinfan Linux - Software 3 09-28-2005 08:19 AM


All times are GMT -5. The time now is 04:00 PM.

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