-
Notifications
You must be signed in to change notification settings - Fork 146
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
libssh overrides configured keys #72
Comments
I think this change came with libssh-0.9.0. See their announcement at https://www.libssh.org/2019/06/28/libssh-0-9-0/ : Edit: typo |
There is a bind option https://gitlab.com/libssh/libssh-mirror/-/blob/master/src/options.c#L1630 |
There's also an issue open on the client side which addresses this issue: tmate-io/tmate#186 |
Hello @UweSauter, This was treated as a bug in Fedora and the inclusion of the OpenSSH server configuration was removed from the I'll check the tmate server code to see if it is possible to call the |
Since libssh 0.9.0 the global server configuration file is automatically parsed when new connections are accepted, unless ssh_bind_options_parse_config() is explicitly called or the automatic parsing is disabled by setting the SSH_BIND_OPTIONS_PROCESS_CONFIG option with false. This adds an explicit call to ssh_bind_options_parse_config() before setting the options to avoid them to be overridden. Fixes tmate-io#72 Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
@UweSauter Could you please check if applying the PR #74 solves the issue for you? |
Since libssh 0.9.0 the global server configuration file is automatically parsed when new connections are accepted, unless ssh_bind_options_parse_config() is explicitly called or the automatic parsing is disabled by setting the SSH_BIND_OPTIONS_PROCESS_CONFIG option with false. This adds an explicit call to ssh_bind_options_parse_config() before setting the options to avoid them to be overridden. Fixes tmate-io#72 Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
#74 looks good as far as I can tell. Thanks. |
Since libssh 0.9.0 the global server configuration file is automatically parsed when new connections are accepted, unless ssh_bind_options_parse_config() is explicitly called or the automatic parsing is disabled by setting the SSH_BIND_OPTIONS_PROCESS_CONFIG option with false. This adds an explicit call to ssh_bind_options_parse_config() before setting the options to avoid them to be overridden. Fixes tmate-io#72 Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Since libssh 0.9.0 the global server configuration file is automatically parsed when new connections are accepted, unless ssh_bind_options_parse_config() is explicitly called or the automatic parsing is disabled by setting the SSH_BIND_OPTIONS_PROCESS_CONFIG option with false. This adds an explicit call to ssh_bind_options_parse_config() before setting the options to avoid them to be overridden. Fixes #72 Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
Since libssh 0.9.0 the global server configuration file is automatically parsed when new connections are accepted, unless ssh_bind_options_parse_config() is explicitly called or the automatic parsing is disabled by setting the SSH_BIND_OPTIONS_PROCESS_CONFIG option with false. This adds an explicit call to ssh_bind_options_parse_config() before setting the options to avoid them to be overridden. Fixes tmate-io#72 Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
OS: CentOS 8.1
libssh: 0.9.0-4.el8
tmate-ssh-server: e1a5e08
libssh has its own configuration in
/etc/libssh
. I cannot say in which version this was introduced.The configuration directives in
/etc/libssh/libssh_server.config
areThis causes all keys that are loaded previously to be exchanged with the system keys.
In my case I run
./tmate-ssh-server -k /etc/tmate/ -p 22022
to use a different set of SSH keys than the system.To diagnose this issue I did run
strace -ff ./tmate-ssh-server -k /etc/tmate/ -p 22022 2>&1 | tee /tmp/tmate-ssh-server.strace.log
. As you can see in the following except of/tmp/tmate-ssh-server.strace.log
, once a child gets forked from the parent process, libssh reads the system SSH keys.This effectively means that you cannot run tmate-ssh-server with SSH keys independent of the system keys. A workaround would be to edit
/etc/libssh/libssh_server.config
but I don't know how practical this would be.The text was updated successfully, but these errors were encountered: