bugzilla-daemon at mindrot.org
2005-Feb-17 11:58 UTC
[Bug 984] Hangup to script while forced command ...
http://bugzilla.mindrot.org/show_bug.cgi?id=984 Summary: Hangup to script while forced command ... Product: Portable OpenSSH Version: 3.9p1 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: sshd AssignedTo: openssh-bugs at mindrot.org ReportedBy: webmyster at addoc.u-psud.fr I have an account named demo. In its $(HOME)/.ssh/authorized_keys, I entered my public key with a forced command that is a script. This script allows the user to make a choice to launch a nohup backgrounded X-window (forked, without hang up signal and without standard I/O). Then, the script leaves, that close the ssh connection. If I connect through ssh to this account without any command (ie : "ssh user at computer"), xinit receives a hangup signal, causing X-window to shut down. However, if i connect to this account with whatever string as command (ie : "ssh user at computer foo"), my script is executed as expected : xinit don't receive any hangup and X-window don't shutdown unless I do it explicitely. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Feb-17 12:18 UTC
[Bug 984] Hangup to script while forced command ...
http://bugzilla.mindrot.org/show_bug.cgi?id=984 ------- Additional Comments From djm at mindrot.org 2005-02-17 23:18 ------- Try setting setting no-pty on the key too. E.g. no-pty,command="xscript" ssh-rsa .... Does that help? HUP is only sent to shells with a controlling terminal ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Feb-18 08:26 UTC
[Bug 984] Hangup to script while forced command ...
http://bugzilla.mindrot.org/show_bug.cgi?id=984 ------- Additional Comments From webmyster at addoc.u-psud.fr 2005-02-18 19:26 ------- (In reply to comment #1)> Try setting setting no-pty on the key too. E.g. > > no-pty,command="xscript" ssh-rsa .... > > Does that help? HUP is only sent to shells with a controlling terminalActually no, because this script is asking the user through the read bash command inside the script. The most important problem, I think, is the strange behaviour that whenever I specify one command (whatever command), it don't hang up my xinit. However, when I don't give any command, a hangup is send to the xinit causing X-window to shutdown. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Feb-18 08:44 UTC
[Bug 984] Hangup to script while forced command ...
http://bugzilla.mindrot.org/show_bug.cgi?id=984 ------- Additional Comments From dtucker at zip.com.au 2005-02-18 19:44 ------- (In reply to comment #2)> > no-pty,command="xscript" ssh-rsa .... > > Actually no, because this script is asking the user through the read bash > command inside the script.Did you try it? "read" just reads from stdin and doesn't need a controlling terminal.> The most important problem, I think, is the strange behaviour that whenever I > specify one command (whatever command), it don't hang up my xinit. However, > when I don't give any command, a hangup is sendBy default, when you "ssh yourserver" you get a pty and when you "ssh yourserver somecommand" you don't. Try "ssh -T yourserver" to prevent allocation of a pty. You could also launch the command in your script with nohup. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Feb-18 09:10 UTC
[Bug 984] Hangup to script while forced command ...
http://bugzilla.mindrot.org/show_bug.cgi?id=984 ------- Additional Comments From webmyster at addoc.u-psud.fr 2005-02-18 20:10 ------- Created an attachment (id=829) --> (http://bugzilla.mindrot.org/attachment.cgi?id=829&action=view) script running as forced-command Here is the script I am running as forced-command. As you can see, there is already nohup to launch commands. The problem when I set no-pty in the authorized-files, is that the display seems strange (loosing the width of the term). But the most important problem is the fact that I can't type anything. I must kill this script from another console. However, the command "ssh -t user at computer" works fine ! ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.