| Summary: | RemoteCommand and PseudoTTY config options | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Björn "Vampire" Kautler <Vampire> | ||||
| Component: | ssh | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | enhancement | CC: | Bert.Wesarg, djm, dtucker, gtisza | ||||
| Priority: | P2 | ||||||
| Version: | 5.1p1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
Björn "Vampire" Kautler
2010-09-04 10:13:36 AEST
OpenSSH 5.9 will have a RequestTTY option, but I don't think we need an option to specify the command May I ask why not? This possibility proved to be veeery useful to me. I'm doing things like the following with it: config: Host wbl RemoteCommand wakeonlan -f wol/bjkau-linux.wol command to wake up my box remotely: ssh wbl config: Host v2bl User root LocalForward 5900 localhost:5900 RemoteCommand x11vnc -localhost -timeout 120 -display :0 -auth /var/lib/gdm/:0.Xauth command to start a secure remote x11vnc session: ssh v2bl vinagre localhost (or invoked via GUI) config which would be possible without RemoteCommand but veeeeery ugly like shown in the initial comment: Host sf* shell.sf.net shell.sourceforge.net HostName shell.sourceforge.net RequestTTY yes RemoteCommand create command to connect to SF Shell service: ssh sfj I would really miss this feature if it doesn't get added and always building an own version with my patch is cumbersome. :-( I'd really appreciate if this also gets added like suggested. (In reply to comment #2) > May I ask why not? My personal opinion would be that this is a job for a script. And note that this is even shorter to type: > config: > > Host v2bl > User root > LocalForward 5900 localhost:5900 > RemoteCommand x11vnc -localhost -timeout 120 -display :0 -auth > /var/lib/gdm/:0.Xauth > > command to start a secure remote x11vnc session: > > ssh v2bl v2bl.sh: #!/bin/sh exec ssh v2bl -t x11vnc -localhost -timeout 120 -display :0 -auth > /var/lib/gdm/:0.Xauth command: v2bl.sh Of course as script or alias it is shorter to type. But I like to have this configuration there. And those also were only examples, there are for sure other use-cases. And hey, if someone doesn't want to use the feature he doesn't have to and can still use scripts or aliases. :-) While neither scripts nor aliases are portable. The ssh config file I can also copy over to a Windows machine running openssh and can immediately use it. Aliases are not possible on Windoze and a script would have to be rewritten as BAT script. Besides that especially the SourceForge case does belong in that config file logically as that "create" command is necessary to establish an SSH connection to the SourceForge shell service. That is why it was my example in the initial description. One possible use case for RemoteCommand would be to set different prompts on certain machines (e.g. if we SSH to the production server, change the prompt to red). This could be done via sshrc, but that might be inconvenient or controversial if the remote account is used by many different people. if you're using openssh on windows you've likely got enough of cygwin to run shell scripts as well. anyway: we're not adding RemoteCommand because it is not needed. there's lots of other ways of achieving the same goal: a local script, remote ForceCommand, remote sshrc, remote shell startup file. This is not FIXED, at most it is WONTFIX. But I cannot agree with "it is not needed". remote ForceCommand, remote sshrc and remote shell startup file can only support one command per user per host (the first even one command for all users) and also the SourceForge usecase is NOT POSSIBLE with it. local script is possible of course, but you can replace most of the other ssh Options by a local script also with using command-line parameters. And the SourceForge case is also there NOT POSSIBLE when trying to use rsync or scp. We added RequestTTY, that's why it was marked as fixed. We don't agree with your rationale for the RemoteCommand changes and have decided not to add it. Close all resolved bugs after 7.3p1 release |