LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 04-26-2006, 08:59 AM   #1
BigLar
LQ Newbie
 
Registered: Jan 2006
Posts: 2

Rep: Reputation: 0
SSH and SFTP sessions


I remotely run apps like nmap, SFTP, etc from an SSH shell. The problem is that I cannot shutdown the machine running the shell until the processes have finished. Is it possible to setup a shell that can be disconnected without killing the running processes and allow me to log back into them?

Thanks!
 
Old 04-26-2006, 09:05 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 11, Sabayon 3.1
Posts: 1,463

Rep: Reputation: 46
have you investigated "NOHUP"?

google it, if not.


not sure it's your answer, but might be.......

this site has something on nohup:
http://www.cpqlinux.com/jobcontrol.html

Last edited by satinet; 04-26-2006 at 09:07 AM.
 
Old 04-26-2006, 10:02 AM   #3
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 56
The answer to your prayers is called "screen". It is installed by default on many distributions, if it is not your distro should provide a package. It is very useful: SSH to a remote host and type screen to enter a screen session. Start whatever time consuming task you like, and then press Ctrl+A followed by Ctrl+C to create a new window in the screen session. This will spawn a new shell where you can do what you want. Create evene more windows using the same command. To switch between two windows quickly, use Ctrl+A followed by Ctrl+A again. As you can see, Ctrl+A puts screen in command mode. Ctrl+A, Ctrl+D will detach from the screen session. You can disconnect from the host and log on again later and use screen -r to resume your session. To go to a specific screen window, type Ctrl+A followed by a number. Screen will exit when all active windows are closed (or the shells within have exited).


Håkan
 
Old 04-26-2006, 10:18 AM   #4
BigLar
LQ Newbie
 
Registered: Jan 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Excellent... Thanks!
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH help, concerning sessions frokid879 Linux - Newbie 4 11-11-2005 11:22 AM
SFTP and SSH XaViaR Linux - Security 5 07-20-2005 10:18 AM
Help with SSH2 sftp/scp sessions on wu-ftp using guest accounts ryoung Linux - Networking 1 10-22-2003 04:26 AM
ssh and sftp help Rex_chaos Linux - Networking 8 03-17-2003 08:12 PM
dead ssh sessions babroga Linux - Networking 3 03-03-2002 06:43 PM


All times are GMT -5. The time now is 08:58 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration