You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Hi,
I was experimenting with go.crypto/ssh to build an ssh client that can
spawn remote process and gather their output.
The remote process happen to be server programs and I want to
terminate them from the client side. Is there a way to do it ?
Cheers,
James Bardin
unread,
Jan 15, 2014, 10:45:37 AM1/15/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
It's no different than any other ssh implementation. All you can do is close the channel, and hope the process on the other end responds to the signal it receives when the remote side shuts down.
mkob...@gmail.com
unread,
Jan 15, 2014, 7:02:46 PM1/15/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mkob...@gmail.com, golan...@googlegroups.com
Sorry, I don't know how I completely forgot about that; is has been ages since I've worked at the ssh protocol level.
Looks like the go library might have this already as Session.Signal too.
Pratap Chakravarthy
unread,
Jan 16, 2014, 5:41:26 AM1/16/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com, James Bardin
Hi, Thx. I am on mac and looks like the `ssh-server` that comes with osx does not support signals. But closing the session seem to kill the remote process, I am not sure this is the reliable way of doing it.
Cheers,
James Bardin
unread,
Jan 16, 2014, 9:31:34 AM1/16/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pratap Chakravarthy, golan...@googlegroups.com
On Thu, Jan 16, 2014 at 5:41 AM, Pratap Chakravarthy <prat...@gmail.com> wrote:
Hi, Thx. I am on mac and looks like the `ssh-server` that comes with osx does not support signals. But closing the session seem to kill the remote process, I am not sure this is the reliable way of doing it.
Ok, now I remember. As of a few years ago openssh ignored signal requests, and by the sound of it they still haven't added that feature.
Closing the session to stop the remote process isn't too bad. The only situation where you're lacking is if the remote process doesn't respond, you don't have a chance to send a KILL. For long running processes, you're probably better off running them independently on the remote host via another mechanism (i.e. your init system), so you're not depending on the ssh server.