LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-22-2013, 03:00 PM   #1
noochi01
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Rep: Reputation: Disabled
SSH connection reset by peer


I'm having an issue with SSH and wondering if the IT gods could assist? I'm running Redhat and totally new to it as well as setting up SSH, so please bear with me when asking a question.

Everytime I try to ssh to the destination outside of my company (they have my public key), I get "write failed: Connection reset by peer".

OpenSSL 1.0.0-fips 29 MAr 2010
debug1: Reading configuration data etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: connecting to XXX.XXX.XXX.XXX [XXX.XXX.XXX.XXXX] port 10022.
debug1: connection established.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type 'Proc-Type'
debug2: key_type_from_name: unknown key type 'DEK-Info'
debug2: key_type_from_name: unknown key type '-----End'
debug1: identity file /home/scpuser/ .ssh/id_rsa type1
debug1: Remote protocol version 2.0, remote software version Maverick_SSHD
debug1: no mathc: Maverick SSHD
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local verison string SSH-2.0-OpenSSH_5.3
debug2: fd 3 setting 0_NONBLOCK
debug1: SSH2_MSG_KEXINT sent
Write failed: Connection reset by peer

Any thoughts would be greatly appreciated. Thanks!
 
Old 11-23-2013, 03:16 AM   #2
GNU/Linux
Member
 
Registered: Sep 2012
Distribution: Slackware-14
Posts: 120

Rep: Reputation: Disabled
I'm not 100% sure but they might have blocked port 22 or their 'sshd' is listening on a different port. Check with them to make sure you are initiating a connection at the right port.
 
Old 11-23-2013, 05:54 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
I've seen this part before:
Code:
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type 'Proc-Type'
debug2: key_type_from_name: unknown key type 'DEK-Info'
debug2: key_type_from_name: unknown key type '-----End'
This was caused by a permission problem. Ssh is very picky when it comes to permissions of its files and directory.

Check/Set these permissions:
Code:
~/.ssh                  --> 700 (drwx------)
~/.ssh/authorized_keys  --> 600 (-rw-------)
~/.ssh/id_rsa           --> 600 (-rw-------)
~/.ssh/id_rsa.pub       --> 640 (-rw-r-----)
~/.ssh/known_hosts      --> 644 (-rw-r--r--)
BTW: This doesn't seem to be an out-of-the-box ssh setup. Is this correct: debug1: connecting to XXX.XXX.XXX.XXX [XXX.XXX.XXX.XXXX] port 10022
 
Old 11-23-2013, 09:15 PM   #4
noochi01
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Druuna/ GNU/LINUX,

It's pretty much an out of the box setup. The XXX is just me redacting the IP for this post, that's all. Port 10022 is specific to the FTP server I'm trying to connect to. That's the port they have open, and others can get to it without issue, so it's not them. And I should have added, my firewall is allowing traffic to flow via port 10022.

OK, When logged in as the user, not root, this is what I see:

etc/ssh
-rw-------. 1 root root 125811 moduli
-rw-r--r--. 1 root root 2062 ssh_config
-rw-------. 1 root root 3872 sshd_config
-rw-------. 1 root root 672 ssh_host_dsa_key
-rw-r--r--. 1 root root 590 ssh_host_dsa_key.pub
-rw-------. 1 root root 963 ssh_host_key
-rw-r--r--. 1 root root 627 ssh_host_key.pub
-rw-------. 1 root root 1675 ssh_host_rsa_key
-rw-r--r--. 1 root root 382 ssh_host_rsa_key.pub

/.ssh
drwxr-xr-x. 2 root root 4096 ssh

/.ssh/
-rw-------. 1 username username 1743 id_rsa
-rw-r--r--. 1 username username 397 id_rsa.pub

I'm having trouble finding the known_hosts or authorized_keys files. When I type find . -name_hosts or find . -name known_host\* I get a list that whips by, and I see permission denied at the end of many of the lines. I can't figure out how to get this list to scroll screen by screen (if that makes sense)...

Thanks in advance!!!!
 
Old 11-23-2013, 10:14 PM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
read the links in my signature, and i am not seeing an authorized_keys file.
 
Old 11-23-2013, 10:39 PM   #6
noochi01
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Lleb- I'm not seeing any link in your signature...

I see them now- now sure why they didn't appear at first. I'll review and let you know. Thanks!!!!!!

Last edited by noochi01; 11-23-2013 at 10:41 PM. Reason: Had to update comment
 
  


Reply



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: Connection reset by peer walidch Linux - Server 2 07-06-2012 04:20 AM
ssh - connection reset by peer laucian Linux - Newbie 4 05-10-2008 02:41 AM
ssh: Connection reset by peer Lotharster Linux - Security 6 01-29-2007 04:54 PM
ssh connection reset by peer Brain Drop Linux - Software 4 07-30-2004 09:18 PM
ssh connection reset by peer bubsgt95 Linux - General 6 06-27-2003 10:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:00 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