Your best friend for file transfer.

Fetch application logoFetch

SSH Exhange Identification Read : Connection Reset By Peer (18 posts)

  • Started 8 months ago by Todd
  • Latest reply 4 weeks ago from Linov Suresh
  • Todd Member

    I am attempting to connect SFTP over port 22. My port forwarding is on and port 22 is open. What can be the problem?

    Posted 8 months ago #

  • Jim Matthews Administrator

    I would open Terminal (found in the Utilities folder) and type:

    ssh -v username@hostname

    where username is your account on the SFTP server, and hostname is the hostname or IP address of the SFTP server. What do you see?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 8 months ago #

  • Todd Member

    Todd--MacBook-Pro:~ todd$ ssh -v HeathPlus@198.101.142.69
    OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
    debug1: Reading configuration data /etc/ssh_config
    debug1: /etc/ssh_config line 20: Applying options for *
    debug1: Connecting to 198.101.142.69 [198.101.142.69] port 22.
    debug1: Connection established.
    Could not create directory '/Users/toddcoggins/.ssh'.
    debug1: identity file /Users/todd/.ssh/id_rsa type -1
    debug1: identity file /Users/todd/.ssh/id_rsa-cert type -1
    debug1: identity file /Users/todd/.ssh/id_dsa type -1
    debug1: identity file /Users/todd/.ssh/id_dsa-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.2
    ssh_exchange_identification: read: Connection reset by peer
    Todd--MacBook-Pro:~ todd$

    Edited 8 months ago #

  • Jim Matthews Administrator

    That's odd -- when I try to connect to that address I get a bit further (far enough to be prompted to enter a password).

    Are you able to connect to any other SFTP servers?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 8 months ago #

  • Todd Member

    I have not tried to connect to any other SFTP servers.

    Posted 8 months ago #

  • Jim Matthews Administrator

    Try typing

    ssh -v fake@getfetch.com

    What is the output then?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 8 months ago #

  • Todd Member

    Last login: Thu Nov 21 14:50:23 on ttys005
    Todd-MacBook-Pro:~ todd$ ssh -v fake@getfetch.com
    OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
    debug1: Reading configuration data /etc/ssh_config
    debug1: /etc/ssh_config line 20: Applying options for *
    debug1: Connecting to getfetch.com [68.178.150.1] port 22.
    debug1: Connection established.
    Could not create directory '/Users/todd/.ssh'.
    debug1: identity file /Users/todd/.ssh/id_rsa type -1
    debug1: identity file /Users/todd/.ssh/id_rsa-cert type -1
    debug1: identity file /Users/todd/.ssh/id_dsa type -1
    debug1: identity file /Users/todd/.ssh/id_dsa-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.2
    debug1: Remote protocol version 2.0, remote software version OpenSSH_3.5p1
    debug1: match: OpenSSH_3.5p1 pat OpenSSH_3.*
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug1: Server host key: RSA de:18:88:be:a9:19:f0:98:12:aa:bc:a1:ff:47:cc:e7
    The authenticity of host 'getfetch.com (68.178.150.1)' can't be established.
    RSA key fingerprint is de:18:88:be:a9:19:f0:98:12:aa:bc:a1:ff:47:cc:e7.
    Are you sure you want to continue connecting (yes/no)? y
    Please type 'yes' or 'no': yes
    Failed to add the host to the list of known hosts (/Users/todd/.ssh/known_hosts).
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: Roaming not allowed by server
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Next authentication method: publickey
    debug1: Trying private key: /Users/todd/.ssh/id_rsa
    debug1: Trying private key: /Users/todd/.ssh/id_dsa
    debug1: Next authentication method: keyboard-interactive
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Next authentication method: password
    fake@getfetch.com's password:

    Edited 8 months ago #

  • Jim Matthews Administrator

    So:

    * You can get to the password prompt on my server but not yours
    * I can get to the password prompt on your server and mine

    It is as if the problem is specific to the combination of your Mac and your server.

    I do see a message about ssh not being able to create a ".ssh" directory in your home directory. Do you know why that is? What happens if you type:

    mkdir /Users/todd/.ssh

    in Terminal?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 8 months ago #

  • Todd Member

    mkdir /Users/todd/.ssh
    mkdir: /Users/todd/.ssh: Permission denied

    Posted 8 months ago #

  • Jim Matthews Administrator

    It's very strange that you don't have permission to create a folder in your own home folder. I would run Disk Utility (in the Utilities folder) and Repair Disk Permissions -- does that help?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 8 months ago #

  • Todd Member

    Very strange, after repairing making a directory still hasn't worked.

    BTW thanks so much for your help.

    Posted 8 months ago #

  • Jim Matthews Administrator

    Can you create .ssh now?

    Posted 8 months ago #

  • ken Member

    I had this problem and it turned out to be that sshd (?) was doing a reverse lookup on my client IP and DNS was not working at the time. The key to finding this was that /var/log/messages on the server was reporting issues with hosts.allow.

    Posted 3 months ago #

  • Kjeld Flarup Member

    I experienced the same.
    When looking into the logs I saw that someone was hammering and trying to guess the root password.
    After blocking that IP, the problem disappeared within a few minutes.

    Coincidence or ?

    Posted 3 months ago #

  • Harold Member

    Hi, I have the same problem. I need to access our windows file server from QNAP in putty.

    When I try to ssh the windows file server with this command in putty:
    ssh -p139 -v sisc-elohim

    I get this error:
    debug1: Connecting to sisc-elohim [143.229.0.3] port 139.
    debug1: Connection established.
    debug1: permanently_set_uid: 0/0
    debug1: identity file /root/ .ssh/ identity type -1
    debug1: identity file /root/ .ssh/ id_rsa type 1
    debug1: identity file /root/ .ssh/ id_dsa type -1
    ssh_exchange_identification: read: Connection reset by peer

    Please help.
    Thank you so much in advance.

    Posted 2 months ago #

  • Jim Matthews Administrator

    Hi,

    I'd recommend contacting the server administrator or the creators of putty for assistance.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 2 months ago #

  • Harold Member

    Thank you.

    Posted 2 months ago #

  • Linov Suresh Member

    Look like you have enabled TCP Wrappers in your system. Please verify hosts.deny file

    Posted 4 weeks ago #

Reply

  • Or nickname, if you prefer.
  • This will be kept confidential.
  • This is to ensure that you’re a person, not a spambot.