Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
daemon doesn't shuts down ssh
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
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5587

PostPosted: Fri Nov 18, 2011 9:16 am    Post subject: daemon doesn't shuts down ssh Reply with quote

hello,

I have a script that runs one of its function as daemon, it works great in bash but when I want to run the command via ssh, the connection stays open and doesn't get closed.

how can I get the same behavior as in normal bash session?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Fri Nov 18, 2011 12:14 pm    Post subject: Reply with quote

Have you tried disassociating the daemon from the calling script by using
Code:
nohup /usr/bin/daemon_binary

?
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5587

PostPosted: Sun Nov 20, 2011 5:14 pm    Post subject: Reply with quote

yup, I still need to hit CTRL+C to continue
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16007

PostPosted: Sun Nov 20, 2011 5:39 pm    Post subject: Reply with quote

Does the problem still occur if you set ssh not to forward anything over the tunnel? No X11 forwarding, no port forwarding, no agent forwarding, etc.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5587

PostPosted: Sun Nov 20, 2011 5:58 pm    Post subject: Reply with quote

Hu wrote:
Does the problem still occur if you set ssh not to forward anything over the tunnel? No X11 forwarding, no port forwarding, no agent forwarding, etc.


is it possible to do when invoking the ssh command? I don't want to disable that in compilation.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16007

PostPosted: Sun Nov 20, 2011 6:32 pm    Post subject: Reply with quote

Yes. It can also be done in your ssh configuration. See man ssh_config. By default, most things are not forwarded. Many people configure X11 forwarding to trusted peers, so I assumed you had done so.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5587

PostPosted: Sun Nov 20, 2011 9:26 pm    Post subject: Reply with quote

Hu wrote:
Yes. It can also be done in your ssh configuration. See man ssh_config. By default, most things are not forwarded. Many people configure X11 forwarding to trusted peers, so I assumed you had done so.

can't seem to find port forwarding, any idea where is it?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
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