Default ssh_config file
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
Default ssh_config file
I can't seem to get my ssh working. I keep getting a connection reset by peer message when testing ssh. I was following the directions in:
https://wiki.debian.org/SSH
Just wondering though after looking at my ssh_config file. Can someone confirm if these options are supposed to be commented out?
Am I supposed to uncomment them?
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h
https://wiki.debian.org/SSH
Just wondering though after looking at my ssh_config file. Can someone confirm if these options are supposed to be commented out?
Am I supposed to uncomment them?
Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Default ssh_config file
Connect to remote host in verbose mode to diagnose the problem:
Code: Select all
ssh -v remote.host.name
or
ssh -v username@remote.host.name
Re: Default ssh_config file
You shouldn't edit that file. but rather ~/.ssh/config and here's mine. I had time out issues years ago, this fixed it.
in my ~/.ssh/config
Have fun.
Code: Select all
Host *
ServerAliveInterval 120
ServerAliveCountMax 30
ConnectTimeout 30
UseRoaming no
Have fun.
Re: Default ssh_config file
Laurent85 wrote:Connect to remote host in verbose mode to diagnose the problem:Code: Select all
ssh -v remote.host.name or ssh -v username@remote.host.name
I'm getting the message:
Code: Select all
OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016
debug1: Reading configuration data /home/<username>/.ssh/config
debug1: /home/<username>/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to <ip address> [<ip address>] port 22.
debug1: fd 3 clearing O_NONBLOCK
debug1: Connection established.
debug1: identity file /home/<username>/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<username>/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<username>/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<username>/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<username>/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<username>/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<username>/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<username>/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u3
ssh_exchange_identification: read: Connection reset by peer
Thanks.
Last edited by webtarget on Fri Aug 05, 2016 4:45 pm, edited 2 times in total.
Re: Default ssh_config file
Habitual wrote:You shouldn't edit that file. but rather ~/.ssh/config and here's mine. I had time out issues years ago, this fixed it.in my ~/.ssh/configCode: Select all
Host * ServerAliveInterval 120 ServerAliveCountMax 30 ConnectTimeout 30 UseRoaming no
Have fun.
This didn't do it, but, it's giving me an idea about how to fix another issue I had with Samba where I was connected to my main computer and my main computer would shut off on me after a certain period.
Re: Default ssh_config file
The problem is on server side, access to the service was denied for some reason. See the ssh server configuration and logs.webtarget wrote: debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-5+deb8u3
ssh_exchange_identification: read: Connection reset by peer
Re: Default ssh_config file
the /var/log/auth.log just says:
- when I used the command: ssh localhost
I also tried user@<ip address> and the log would say:
This is after a purge and re-install of openssh-server and deleting my .ssh directory and recreating keys using:
Unless there are other suggestions, can someone tell me what steps to take to start from scratch without re-installing the OS. I remember when this worked and it was quite easy. So, I'd rather just restart from scratch if possible. I thought a purge and deleting my .ssh directory would do it. Is there anything else I need to do to make it seem like it's a brand new install?
Code: Select all
sshd[6198]: refused connect from ::1 (::1)
I also tried user@<ip address> and the log would say:
Code: Select all
sshd[6089]: refused connect from <ip address> (<ip address>)
Code: Select all
ssh-keygen -t rsa
Re: Default ssh_config file
The message is pretty clear, sshd refused the connection from localhost ::1 ipv6 address, have you changed the default /etc/hosts.deny and /etc/hosts.allow files content ?webtarget wrote:the /var/log/auth.log just says:Code: Select all
sshd[6198]: refused connect from ::1 (::1)
Re: Default ssh_config file
OMG, I forgot about that! I didn't know about those files actually and learned about them and changed them one time when I was reading some article. I was only thinking that my firewall was disabled so nothing should be stopping my connection.Laurent85 wrote:The message is pretty clear, sshd refused the connection from localhost ::1 ipv6 address, have you changed the default /etc/hosts.deny and /etc/hosts.allow files content ?webtarget wrote:the /var/log/auth.log just says:Code: Select all
sshd[6198]: refused connect from ::1 (::1)
Thanks a lot!