Re: HP-UX: ssh connections ignore CTRL+C interrupts
peter.kielbasiewicz_at_philips.com
Date: 03/11/04
- Previous message: Bob Rasmussen: "Re: HP-UX: ssh connections ignore CTRL+C interrupts"
- Maybe in reply to: peter.kielbasiewicz_at_philips.com: "HP-UX: ssh connections ignore CTRL+C interrupts"
- Next in thread: Bob Rasmussen: "Re: HP-UX: ssh connections ignore CTRL+C interrupts"
- Reply: Bob Rasmussen: "Re: HP-UX: ssh connections ignore CTRL+C interrupts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
To: Bob Rasmussen <ras@anzio.com> Date: Thu, 11 Mar 2004 15:00:51 +0100
Hello Bob,
now I see the point. You are telling me that the client should tell the
daemon what the interrupt key is.
It seems that this does not work on HPUX.
When I ssh from HPUX to another HPUX box and I type 'stty' I get the
following:
# stty
speed 9600 baud; evenp hupcl
intr = ^C; erase = ^H; kill = ^U;
....
Intr seems to be set but Ctrl-C does not work.
When I type 'stty sane' and then 'stty' the intr setting is gone.
# stty sane
# stty
speed 9600 baud; evenp hupcl
eol2 = ^@; swtch = ^@;
....
Now I do 'stty intr "^C"' and stty which says intr is set now, but still
Ctrl-C does not work.
The only way to Ctrl-C working is to start the sshd from an interactive
shell where Ctrl-C is already set.
# stty intr "^C"
# stty
speed 9600 baud; evenp hupcl
intr = ^C;
eol2 = ^@; swtch = ^@;
...
--
best regards
Peter Kielbasiewicz
____________________________________________________________________________
Philips Medizin Systeme Böblingen GmbH
Peter Kielbasiewicz Phone: +49 (7031) 463-1893
Building 5 CMS-B IT (2C9) FAX :
+49 (7031) 463-2944
Hewlett-Packard-Strasse 2
71034 Boeblingen e-mail: Peter.Kielbasiewicz@philips.com
____________________________________________________________________________
Jochen M. Franke, Dr. Werner Haas (Sprecher), David Russell, Wolfgang
Strenzl
Sitz der Gesellschaft: Böblingen
Registergericht Böblingen Reg.-Nr. HRB 5187
Bob Rasmussen <ras@anzio.com>
10.03.2004 15:54
To: Peter Kielbasiewicz/BBL/MS/PHILIPS@EMEA1
cc: secureshell@securityfocus.com
Subject: Re: HP-UX: ssh connections ignore CTRL+C interrupts
Classification:
On Wed, 10 Mar 2004 peter.kielbasiewicz@philips.com wrote:
> I think my issue needs some clarification.
> When I start sshd from an interactive shell, everything works fine.
> My shell has "stty intr '^C'" and thus the sshd inherits this setting so
> that all ssh clients connecting to it can use Ctrl-C for interrupting
> processes.
> The issue is that at system boot sshd is started from a startup script
run
> by init and not from a tty.
> If I add an stty command to this script I get an error telling me that
> there is no tty.
> Because the startup script has no tty it has no setting for 'intr' and
so
> Ctrl-C does not work.
> This can be very awkward if you have a hanging command and the only
thing
> you can do then is to kill the whole ssh session.
>
> So the problem can be reduced to get a tty or pty attached to the
startup
> process so that 'intr' can be set correctly before it starts the sshd
> daemon process.
I think the problem is in your expectations. You are expecting the sshd,
that is, the daemon, to establish stty options for all the shell/tty
sessions that it launches. But that one sshd may need to launch multiple
sessions, for multiple users, who have different requirements. Maybe one
user wants to use ctrl-C as an interrupt key, and another wants to use
DELete, for instance.
It may be true that when sshd is launched from a tty session, it inherits
the tty settings of that process. If the sshd is launched at startup, the
stty settings should probably be considered "uninitialized variables".
The proper way for stty settings to be established is by the client. Part
of the SSH protocol is for the client to tell the daemon what the stty
settings should be. That way each client/user can have its own settings.
If you start a Unix/Linux based SSH client from a shell session, it should
inherit the stty settings of that shell session, and pass them to the
daemon. If you are running a Windows-based SSH client, it should establish
a reasonable set of conditions (Anzio, our client, does this).
What client are you running?
Finally, if the settings sent by the client are not appropriate, they can
be overridden by an stty command in the shell startup script for the user
(.profile, .bashrc), or even at a system-wide level (/etc/profile).
Hope that helps.
Regards,
....Bob Rasmussen, President, Rasmussen Software, Inc.
personal e-mail: ras@anzio.com
company e-mail: rsi@anzio.com
voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
fax: (US) 503-624-0760
web: http://www.anzio.com
- Previous message: Bob Rasmussen: "Re: HP-UX: ssh connections ignore CTRL+C interrupts"
- Maybe in reply to: peter.kielbasiewicz_at_philips.com: "HP-UX: ssh connections ignore CTRL+C interrupts"
- Next in thread: Bob Rasmussen: "Re: HP-UX: ssh connections ignore CTRL+C interrupts"
- Reply: Bob Rasmussen: "Re: HP-UX: ssh connections ignore CTRL+C interrupts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|