-
Notifications
You must be signed in to change notification settings - Fork 2k
Add ssh_config equivalents of -N, -s, -n and -f #231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
openssh#231 openssh@6c6813f openssh@de28eef openssh@aac32c9 openssh@0f7dd4d https://marc.info/?l=openssh-unix-dev&m=147248154926769 https://marc.info/?l=openssh-unix-dev&m=161301825023655 https://marc.info/?l=openssh-unix-dev&m=161387765919633 Description (from @vog): Dear OpenSSH developers, I kindly ask you to review the attached set of patches which introduce ssh_config equivalents of the flags -N, -n and -f in a straight-forward way: NoShell for -N StdinNull for -n ForkAfterAuthentication for -f The ssh_config names were derived directly from the internal flag names, e.g. no_shell_flag was moved to option.no_shell and hence the ssh_config name became NoShell. The man pages ssh(1) and ssh_config(5) are adjusted accordingly. As a final remark, I noticed that the variable ono_shell_flag (not to be confused with no_shell_flag) is only assigned once and never used. So I assume this is dead code and I'm proposing a patch to remove it.
6c6813f to
792101d
Compare
|
Rebased to latest master. |
792101d to
45a7907
Compare
|
Rebased again to latest master. |
45a7907 to
8cf12df
Compare
|
Rebased again to latest master. |
8cf12df to
c8d5494
Compare
c8d5494 to
a20217b
Compare
|
Rebased yet another time to latest master. |
a20217b to
b50aeb2
Compare
|
Rebased to latest master, removing the commit that removed |
|
Feedback from Damien Miller via mailing list:
|
b50aeb2 to
b9e0e25
Compare
|
Implemented |
mux.c
Outdated
| extern Options options; | ||
| extern int stdin_null_flag; | ||
| extern char *host; | ||
| extern int subsystem_flag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should extern int subsystem_flag be removed too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course! Fixed.
ssh_config.5
Outdated
| is run in the background. | ||
| A common trick is to use this to run X11 programs on a remote machine. | ||
| For example, | ||
| .Ic ssh shadows.cs.hut.fi emacs & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this say ssh -n ...? Or ssh -o StdinNull=yes ...?
Otherwise, you've silently assumed the reader has put this option in ~/.ssh/config for Host shadows.cs.hut.fi (but they may not wish to do so for every session to that host)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took that example from the ssh.1 manpage where "ssh -n" is described.
I agree that it doesn't fit well here.
I'm just leaving this out of ssh_config.5, the description is perfectly fine without it.
| and | ||
| .Cm sha256 | ||
| (the default). | ||
| .It Cm ForkAfterAuthentication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these new options also be listed in ssh.1 under -o option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed! I missed that place in the manpages. Fixed.
|
Thanks for the feedback! I'll have a look at it this evening. |
…nd -s Also, combine the internal flags "no_shell_flag" and "subsystem_flag" into a single enum "session_type".
b9e0e25 to
8f31723
Compare
|
I just improved the pull request by rebasing it to the latest master and applying all feedback received via mailing list and in this GitHub issue so far. |
|
FYI these patches are all out for review upstream |
|
Thanks! |
|
SessionType merged as eda8909 |
|
@djmdjm Thanks for the notification! What is the status of the other 2 commits? Should I rebase them, or anything? |
Dear OpenSSH developers,
I kindly ask you to review the attached set of patches which introduce
ssh_configequivalents of the flags-N,-s,-nand-fin a straight forward way:NoShellfor-NSessionTypefor-Nand-sStdinNullfor-nForkAfterAuthenticationfor-fThe
ssh_confignames are corresponding directly to the internal flag names. The man pagesssh(1)andssh_config(5)are adjusted accordingly.As a final remark, I noticed that the variableono_shell_flag(not to be confused withno_shell_flag) is only assigned once and never used. So I assume this is dead code and I'm proposing a patch to remove it.(Update:
ono_shell_flagwas actually meant to be used, see 5953c14)Related mailing list threads:
Best regards,
Volker