Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to send process in ssh to background?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
midnite
Apprentice
Apprentice


Joined: 09 Apr 2006
Posts: 238
Location: Hong Kong

PostPosted: Fri Jul 13, 2007 9:32 am    Post subject: how to send process in ssh to background? Reply with quote

i use sshd to access my gentoo from another computer. i found that when i close my sshd client (PuTTY), the process in my gentoo box stops also. It is very inconvenience for installing some large package; i have to keep two computers on! Is there some way to send the process to background, such that it will continue even if i close the ssh connection?

Last edited by midnite on Fri Jul 13, 2007 11:52 am; edited 1 time in total
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2395

PostPosted: Fri Jul 13, 2007 9:41 am    Post subject: Reply with quote

didn't you start sshd with "/etc/init.d/sshd start" ?
that would make sshd run as a normal deamon until you do "/etc/init.d/sshd stop".
Back to top
View user's profile Send private message
Tintamarre
n00b
n00b


Joined: 11 Jun 2007
Posts: 63
Location: Belgium

PostPosted: Fri Jul 13, 2007 9:50 am    Post subject: Reply with quote

You can use SCREEN
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2395

PostPosted: Fri Jul 13, 2007 9:59 am    Post subject: Reply with quote

oh, what you meant was ssh, not sshd. yes, then screen is the weapon of choice.
Back to top
View user's profile Send private message
Sven Vermeulen
Developer
Developer


Joined: 29 Aug 2002
Posts: 1341
Location: Mechelen, Belgium

PostPosted: Fri Jul 13, 2007 10:55 am    Post subject: Reply with quote

I'm fully supportive of screen as well. Just in case you're looking for something else, use nohup for your process. More primitive, but might be your only option if you don't have screen and aren't an administrator of that system.
_________________
Please add "[solved]" to the initial topic title when it is solved. TIA.
Linux Sea (PDF), an online e-book on Gentoo Linux
Back to top
View user's profile Send private message
JeliJami
Veteran
Veteran


Joined: 17 Jan 2006
Posts: 1086
Location: Belgium

PostPosted: Fri Jul 13, 2007 11:12 am    Post subject: Reply with quote

ssh and disconnecting from the shell
SSH question
emerging over SSH
Keeping jobs going after closing ssh shell?
_________________
Unanswered Post Initiative | Search | FAQ
Former username: davjel
Back to top
View user's profile Send private message
midnite
Apprentice
Apprentice


Joined: 09 Apr 2006
Posts: 238
Location: Hong Kong

PostPosted: Fri Jul 13, 2007 11:48 am    Post subject: Reply with quote

Thanks very much from all of your help!!

excuse me, in nohup, what is the meaning of "nice" ?
Back to top
View user's profile Send private message
Sven Vermeulen
Developer
Developer


Joined: 29 Aug 2002
Posts: 1341
Location: Mechelen, Belgium

PostPosted: Fri Jul 13, 2007 12:17 pm    Post subject: Reply with quote

With "nice" you can tell the operating system how "nice" your process should be for other processes.

The more "nice" it is to others, the more it'll allow others to obtain more CPU cycles than your process. So if you give a "nice" value of 20, your process will most likely run with the lowest possible priority. If you tell it to have a very low "nice" value (like -19) it'll attempt to run with an as high priority as possible.
_________________
Please add "[solved]" to the initial topic title when it is solved. TIA.
Linux Sea (PDF), an online e-book on Gentoo Linux
Back to top
View user's profile Send private message
mark_alec
Bodhisattva
Bodhisattva


Joined: 11 Sep 2004
Posts: 6066
Location: Melbourne, Australia

PostPosted: Fri Jul 13, 2007 12:38 pm    Post subject: Reply with quote

Moved from Networking & Security to Duplicate Threads.

See threads davjel posted.
_________________
www.gentoo.org.au || #gentoo-au
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum