Open kristoferus75 opened 5 years ago
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...
Thanks on debain it works now with your help :-)
Hi !
I have compiled tmate-slave on centos 7 and i now get this error:
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