LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-02-2014, 03:52 AM   #1
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,293

Rep: Reputation: 52
ssh_exchange_identification: read: Connection reset by peer


I get the message above after installing Debian 7 although I thought I have been able to connect since.

Here are the messages:
rene@asus:~$ ssh -v root@173.0.55.170
OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 173.0.55.170 [173.0.55.170] port 22.
debug1: Connection established.
debug1: identity file /home/rene/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/rene/.ssh/id_rsa-cert type -1
debug1: identity file /home/rene/.ssh/id_dsa type -1
debug1: identity file /home/rene/.ssh/id_dsa-cert type -1
debug1: identity file /home/rene/.ssh/id_ecdsa type -1
debug1: identity file /home/rene/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: read: Connection reset by peer

And here is the /etc/ssh/ssh_config:
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
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no

I have no idea what the problem could be, can anyone help?

Thank you for your help.

Last edited by rblampain; 03-02-2014 at 04:00 AM.
 
Old 03-02-2014, 12:57 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
check your local and remote permissions. to see more read the links in my sig.
 
Old 03-02-2014, 11:38 PM   #3
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,293

Original Poster
Rep: Reputation: 52
With the -vvv switch I had a complaint (which I did not record) about the key so I adjusted /etc/ssh/ssh_config as per your instructions (plus what was already uncommented):
Host *
ForwardAgent yes
ForwardX11 yes
ServerAliveInterval 30
TCPKeepAlive yes
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
ServerAliveCountMax 5

and I deleted the existing keys, then created a new one as per your instructions, however trying to copy it to the remote did not work as shown below:
rene@asus:~$ ssh-copy-id -vvv -i ~/.ssh/id_rsa.pub root@173.0.55.120 25
OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013
Pseudo-terminal will not be allocated because stdin is not a terminal.
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
ssh: Could not resolve hostname umask 077; test -d ~/.ssh || mkdir ~/.ssh ; cat >> ~/.ssh/authorized_keys && (test -x /sbin/restorec: Name or service not known

It is still all behond my ability, can you help?

PS I now have an unwanted rsa_pub on the remote.

Thank you.
 
Old 03-03-2014, 02:51 AM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
you can remove unwanted rsa_pub manually, also you can transfer the id.rsa_pub manually as shown in my links. the copy-ssh-id is a script to perform the same task as you can perform manually as per my link instructions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh_exchange_identification: read: Connection reset by peer BCarey Slackware 4 12-12-2016 02:27 PM
[SOLVED] ssh/sshfs erroneous SOCKS response & read: Connection reset by peer postcd Linux - Software 2 04-05-2014 04:26 AM
sslReadServer: FD 72: read failure: (104) Connection reset by peer Niceman2005 Linux - Software 2 02-03-2011 08:37 AM
fatal: Read from socket failed: Connection reset by peer prakash.akumalla Linux - Newbie 0 07-18-2008 04:42 AM
SSH fatal: Read from socket failed: Connection reset by peer humbletech99 Linux - Networking 3 01-03-2007 06:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration