Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problem with remote administration with ssh[SOLVE]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lnthai2002
Apprentice
Apprentice


Joined: 04 Nov 2005
Posts: 260

PostPosted: Tue Nov 29, 2005 10:04 pm    Post subject: problem with remote administration with ssh[SOLVE] Reply with quote

I intended to use a ssh client(putty or openssh secure shell) at school to do some time-comsumming tasks on my gentoo at home. At school, i login remotely as root to my gentoo at home and tried:
Code:
emerge abiword

I saw a normal building process start, but i didnt wait for it to finish compiling the whole program, i disconnected from the server at home(i just click X on the ssh client, i didnt log out ). I though linux will continue compiling abiword for me, but when i got home, i recognized that abiword has not been emerged, i dont have it !!!
Is that normal? Is a session(in my case, root) will terminate as soon as i exit ?
If yes, then is there anyway that i can do a time-consumming task remotely(not just write a bash script and run it before going to school)? Sometimes when i am at school, i have to do some stuff on my comp, but i cant go home, so i need a way to control my comp remotely.


Last edited by lnthai2002 on Tue Dec 06, 2005 2:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
bLaXe
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2004
Posts: 81
Location: Berkshire, UK

PostPosted: Tue Nov 29, 2005 10:10 pm    Post subject: Reply with quote

I think you'll find that 'screen' will solve this for you.
Code:
emerge screen

Then when you login remotely simply type 'screen' and you will start a 'virtual' terminal. Start your emerge (or whatever) in this terminal.
You can now 'detatch' this terminal by pressing 'ctrl+a ctrl+d' - the process (emerge or whatever) will continue in the background. You can logout, or be disconnected and the process will continue. To re-attach the detatched 'screen' simply type 'screen -r'. There is much better description of this on the forums somewhere, have a bit of a search.

Screen can do much more than this (man screen).
Back to top
View user's profile Send private message
lnthai2002
Apprentice
Apprentice


Joined: 04 Nov 2005
Posts: 260

PostPosted: Wed Nov 30, 2005 2:57 am    Post subject: Reply with quote

Cool, this is definitely what i want. Thanks for your help. I will try it as soon as i finish stuf on window
Back to top
View user's profile Send private message
d_m
Guru
Guru


Joined: 12 Jun 2003
Posts: 570
Location: Philadelphia, PA, USA

PostPosted: Wed Nov 30, 2005 3:57 am    Post subject: Reply with quote

While screen is probably better for a variety of reasons, it is always possible to do this without screen (assuming you don't want to watch the output) with something like:

Code:
nohup emerge foobar &


This will put emerge in the background and it won't stop when you disconnect. You could also store the output with something like:

Code:
nohup emerge foobar > foobar.output 2>&1 &


This will redirect output to "foobar.output", and redirected stderr there also.
_________________
The name that can be named is not the eternal name.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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