Hello.
I installed FreeBSD 13.1 on a Supermicro X8DT3 and also on an AMD desktop machine.
I installed OpenSSH server on the X8DT3.
Now when I try to connect to it by LAN using:
Everything works. But then after some time it gets disconnected and then I can not reconnect to it and need to reboot to be able to reconnect to it.
This is what I get when it automatically kicks out the client:
So I try to reconnect:
Then I get:
Here are the verbose details when I try to reconnect again:
This is what I get when I try to use the regular SSH client:
So I try to use the cipher syntax and also set it to the
I provide the correct FreeBSD login password for the username "user".
On the server machine, I set root login and Public key enabled and turned off Password Authenticate. This makes SSH to work but only after a reboot and only works for few mins then it kicks out the client and after that completely refuses to login.
I also set "ServerAliveInterval=60" to the client machine on
Also did the firewall
Then entered on terminal:
Thanks for any advice.
I installed FreeBSD 13.1 on a Supermicro X8DT3 and also on an AMD desktop machine.
I installed OpenSSH server on the X8DT3.
Now when I try to connect to it by LAN using:
Code:
# ssh -vvv -p 2222 user@192.168.0.104
Everything works. But then after some time it gets disconnected and then I can not reconnect to it and need to reboot to be able to reconnect to it.
This is what I get when it automatically kicks out the client:
Code:
client_loop: send disconnect: Broken pipe
So I try to reconnect:
Code:
$ ssh -p 2222 user@192.168.0.104
Then I get:
Code:
ssh: connect to host 192.168.0.104 port 2222: No route to host
Here are the verbose details when I try to reconnect again:
Code:
OpenSSH_8.8p1, OpenSSL 1.1.1o-freebsd 3 May 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname 192.168.0.104 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/user/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/user/.ssh/known_hosts2'
debug3: ssh_connect_direct: entering
debug1: Connecting to 192.168.0.104 [192.168.0.104] port 2222.
debug3: Fssh_set_sock_tos: set socket 4 IP_TOS 0x48
debug1: connect to address 192.168.0.104 port 2222: Connection refused
ssh: connect to host 192.168.0.104 port 2222: Connection refused
This is what I get when I try to use the regular SSH client:
Code:
$ ssh -vvv user@192.168.0.104
Code:
OpenSSH_8.8p1, OpenSSL 1.1.1o-freebsd 3 May 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname 192.168.0.104 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/user/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/user/.ssh/known_hosts2'
debug3: ssh_connect_direct: entering
debug1: Connecting to 192.168.0.104 [192.168.0.104] port 22.
debug3: Fssh_set_sock_tos: set socket 4 IP_TOS 0x48
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/user/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: identity file /home/user/.ssh/id_ed25519-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519_sk type -1
debug1: identity file /home/user/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/user/.ssh/id_xmss type -1
debug1: identity file /home/user/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.8 FreeBSD-20211221
debug1: Remote protocol version 2.0, remote software version dropbear_0.50
debug1: Fssh_compat_banner: no match: dropbear_0.50
debug2: fd 4 setting O_NONBLOCK
debug1: Authenticating to 192.168.0.104:22 as 'user'
debug3: Fssh_record_hostkey: found key type RSA in file /home/user/.ssh/known_hosts:1
debug3: Fssh_load_hostkeys_file: loaded 1 keys from 192.168.0.104
debug1: Fssh_load_hostkeys: fopen /home/user/.ssh/known_hosts2: No such file or directory
debug1: Fssh_load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: Fssh_load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: prefer hostkeyalgs: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
debug2: host key algorithms: rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com
debug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
debug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: diffie-hellman-group1-sha1
debug2: host key algorithms: ssh-rsa
debug2: ciphers ctos: 3des-cbc
debug2: ciphers stoc: 3des-cbc
debug2: MACs ctos: hmac-sha1
debug2: MACs stoc: hmac-sha1
debug2: compression ctos: zlib,none
debug2: compression stoc: zlib,none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: (no match)
Unable to negotiate with 192.168.0.104 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
So I try to use the cipher syntax and also set it to the
ssh_config
file:
Code:
$ ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 user@192.168.0.104
Code:
$ user@192.168.0.104's password:
Permission denied, please try again.
I provide the correct FreeBSD login password for the username "user".
On the server machine, I set root login and Public key enabled and turned off Password Authenticate. This makes SSH to work but only after a reboot and only works for few mins then it kicks out the client and after that completely refuses to login.
I also set "ServerAliveInterval=60" to the client machine on
/etc/ssh/ssh_config
. To prevent ssh auto timeouts.Also did the firewall
/etc/pf.conf
:
Code:
pass in proto tcp from any to any port 2222
pass in proto tcp from any to any port 22
Then entered on terminal:
pfctl -f /etc/pf.conf
Thanks for any advice.