Operating System - HP-UX
1830525 Members
2569 Online
110006 Solutions
New Discussion

pseudo terminal / telnet session

 
Steve_3
Frequent Advisor

pseudo terminal / telnet session

Is there a way to reconnect to a pseudo terminal session?

For Example:

I dial into the network and telnet to one of my HP server. When you telnet, you create a pseudo terminal session, right? Say I am copying files from one directory to another. If I get disconnect by the network, the pseudo terminal dies. Is the copying stop?

My question: How can I keep the pseudo terminal session alive so I can reconnect to that session. Can you do that?



Thanks,
Steve
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: pseudo terminal / telnet session

Steve:

Use the 'nohup' command for running processes that you do not want interrupted (killed) when a disconnection of the session occurs. See the man pages for 'nohup'.

...JRF...
Patrick Wallek
Honored Contributor

Re: pseudo terminal / telnet session

You could also run the command as an at job. That should prevent it from being killed when you are disconnected.

As for being able to reconnect to the same pseudo terminal -- If you are disconnected and reconnect, and telnet back to the machine, you MAY connect to the same pseudo-terminal you had before, but you will be connecting as a brand new session. You will have to log in again. If you come in on a different pseudo-term then your previous session may be held open since it was not disconnected from properly, but I do not know of a way to reconnect to the specific session once you have been disconnected from your dial up connection.
Steve_3
Frequent Advisor

Re: pseudo terminal / telnet session

I know you can use "nohup" command for process not getting kill. But, can I keep a session alive to reconnect to it.

Thanks,
Steve
Paula J Frazer-Campbell
Honored Contributor

Re: pseudo terminal / telnet session

Hi Steve
Instead of trying to reconnect why not identify the reason that the network is dropping the telnet session so that you can stay connected.
It sounds like a timeout is in force somewhere along your connection link.
When your telnet session drops where does it take you back to, a fresh dialin situation, your firewall ETC.

HTH

Paula

If you can spell SysAdmin then you is one - anon
Kevin Ernst
Regular Advisor

Re: pseudo terminal / telnet session

If I'm not mistaken, this is something that the GNU 'screen' utility can do. It allows you to 'detach' login sessions or running programs, and re-attach them later with another instance of 'screen.' I haven't really had a need to use it lately (I'm spoiled on Linux's 'virtual consoles'), but it's a handy utility for when you have to work over a dial-up line to a shell server.

More information and a list of mirror sites at: http://www.gnu.org/software/screen/

You can get a precompiled binary for an older version (3.7.4; latest appears to be 3.9.8) at the Porting Archive: http://hpux.cae.wisc.edu