Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to connect to server B which is behind a firewall, using AliasForB. I SSH to server A first, and then from there I can SSH to server B. I am attempting to connect directly to server B by typing shorthand "ssh AliasForB". Both A and B require different usernames.

Based on a previous response, I used the following configuration, however, there is a small problem. When I close the connection, it appears that the connection on A is "killed" rather than closed gracefully. How can I fix this?

$> logout
Connection to B closed.
Killed by signal 1.

My configuration:

Host AliasForA
     Hostname FQDN.for.A.com
     User MyUsernameForA


Host AliasForB
     Hostname FQDN.for.B.com
     User MyUserNameForB
     ProxyCommand ssh AliasForA nc -w 3 %h %p
share|improve this question
1  
Why are you even worrying about this? In the great grand scheme of things, having nc get a HUP barely even rates a mention in the badness stakes. –  womble Sep 17 '09 at 0:20

1 Answer 1

up vote 2 down vote accepted

Signal 1 is SIGHUP-- i.e. "hang up". It isn't "not graceful"-- netcat is just stopping because sshd sends it a SIGHUP. Yeah, yeah-- other people are annoyed by it, too, but it's really no big deal. Here's the backstory about it, BTW.

share|improve this answer
    
I'd just add that SSH is behaving properly. If you have an application that you want to persist in the event of a SIGHUP, you can use nohup or launch it with a wrapper that intercepts the signal and does whatever you define as "graceful". –  duffbeer703 Sep 17 '09 at 1:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.