Skip to content
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

tmate-slave on Centos7 ssh_bind_options_set: Unknown ssh option 10 #53

Open
kristoferus75 opened this issue Jan 9, 2019 · 2 comments
Open

Comments

@kristoferus75
Copy link

Hi !

I have compiled tmate-slave on centos 7 and i now get this error:

/etc/tmate-slave/keys#ls -la
total 16K
-rw-r--r-- 1 tmate-slave tmate-slave  418 Jan  9 11:08 ssh_host_rsa_key.pub
-rw------- 1 tmate-slave tmate-slave 1.7K Jan  9 11:08 ssh_host_rsa_key
-rw-r--r-- 1 tmate-slave tmate-slave  118 Jan  9 11:08 ssh_host_ed25519_key.pub
-rw------- 1 tmate-slave tmate-slave  432 Jan  9 11:08 ssh_host_ed25519_key

tmate-slave -k /etc/tmate-slave/keys -p 22 -v
<6> (tmate) [ssh_bind_options_set] ssh_bind_options_set: Unknown ssh option 10
<6> (tmate) [ssh_bind_options_set] ssh_bind_options_set: Unknown ssh option 10
<6> (tmate) [ssh_bind_options_set] ssh_bind_options_set: Unknown ssh option 10
<6> (tmate) [ssh_bind_import_keys] ssh_bind_import_keys: ECDSA, DSA, or RSA host key file must be set
<2> (tmate) fatal: Error listening to socket: ECDSA, DSA, or RSA host key file must be set

Please help !

kind regards

kristoferus

@faust64
Copy link

faust64 commented Jan 13, 2019

Looks like it has to do with libssh, somehow.

I used to have the error related in issue #52 , and ended up building libssh on my own.

Then, starting tmate-slave, I've been having your host key file must be set error:

root@sshgw:/usr/src/worteks-sshgw# tmate-slave -k /etc/tmate-slave/keys -p 2222 -h sshgw.demo.local -a /etc/tmate-slave/authorized_keys -b 0.0.0.0 -v -v -v -v -v -v -v
tmate-slave: /usr/lib/x86_64-linux-gnu/libssh.so.4: no version information available (required by tmate-slave)
<9> (tmate) [ssh_pki_import_privkey_base64] ssh_pki_import_privkey_base64: Trying to decode privkey passphrase=false
<6> (tmate) [ssh_bind_options_set] ssh_bind_options_set: Unknown ssh option 10
<9> (tmate) [ssh_pki_import_privkey_base64] ssh_pki_import_privkey_base64: Trying to decode privkey passphrase=false
<9> (tmate) [ssh_pki_openssh_privkey_import] ssh_pki_openssh_privkey_import: Opening OpenSSH private key: ciphername: none, kdf: none, nkeys: 1

<6> (tmate) [ssh_bind_options_set] ssh_bind_options_set: Unknown ssh option 10
<9> (tmate) [ssh_pki_import_privkey_base64] ssh_pki_import_privkey_base64: Trying to decode privkey passphrase=false
<6> (tmate) [ssh_bind_options_set] ssh_bind_options_set: Unknown ssh option 10
<6> (tmate) [ssh_bind_import_keys] ssh_bind_import_keys: ECDSA, DSA, or RSA host key file must be set
<2> (tmate) fatal: Error listening to socket: ECDSA, DSA, or RSA host key file must be set

As far as I understand, that error comes from libssh ( https://git.libssh.org/projects/libssh, ../src/bind.c around row 155 ), and means that none of our keys were passed to ssh.

Back to tmate sources, it sounds like the "unknown ssh option 10" is related to https://github.com/tmate-io/tmate-slave/blob/master/tmate-ssh-server.c#L349

I would supposed SSH_BIND_OPTIONS_IMPORT_KEY is that "option 10", which is then 10th element from libssh' include/libssh/server.h ssh_bind_options_e enum.

As I was looking for conflicting libsshs on my system, I found one:

root@sshgw:/usr/src/worteks-sshgw# dpkg -l|grep libssh
ii  libssh-4:amd64                   0.7.3-2+deb9u1                 amd64        tiny C SSH library (OpenSSL flavor)
ii  libssh2-1:amd64                  1.7.0-1                        amd64        SSH2 client-side library
root@sshgw:/usr/src/worteks-sshgw# apt-get remove libssh-4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  zlib1g-dev
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
  libssh-4
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 525 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 44891 files and directories currently installed.)
Removing libssh-4:amd64 (0.7.3-2+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...

Now, tmate-slave properly starts:

root@sshgw:/usr/src/worteks-sshgw# tmate-slave -k /etc/tmate-slave/keys -p 2222 -h sshgw.demo.local -a /etc/tmate-slave/authorized_keys -b 0.0.0.0 -v -v -v -v -v -v -v
<7> (tmate) [ssh_pki_import_privkey_base64] ssh_pki_import_privkey_base64: Trying to decode privkey passphrase=false
<7> (tmate) [ssh_pki_import_privkey_base64] ssh_pki_import_privkey_base64: Trying to decode privkey passphrase=false
<7> (tmate) [ssh_pki_openssh_import] ssh_pki_openssh_import: Opening OpenSSH private key: ciphername: none, kdf: none, nkeys: 1

<7> (tmate) [ssh_pki_import_privkey_base64] ssh_pki_import_privkey_base64: Trying to decode privkey passphrase=false
<5> (tmate) Accepting connections on 0.0.0.0:2222

I would suggest you look at libssh versions available on your system...

@kristoferus75
Copy link
Author

Thanks on debain it works now with your help :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants