<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Connection reset by peer &#8212; ssh sshfs error</title>
	<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/</link>
	<description>Diary of my Linux journeys. Everything Linux by Kamil Wójcicki</description>
	<pubDate>Fri, 29 Aug 2008 07:42:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: matt</title>
		<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-291</link>
		<author>matt</author>
		<pubDate>Mon, 30 Jun 2008 08:12:59 +0000</pubDate>
		<guid>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-291</guid>
		<description>For anyone having trouble using keys with names, like me using multiple keys for multiple machines, here's  a tip. Say this is your key, and your machine only accepts keys, no passwords.

/home/user/.ssh/privatekey

If you try to login using the normal "-i" ssh option, you'll get the infamous "Connection reset by peer," and with debug it will show "Permission denied (publickey)."

(WRONG)     sshfs -p 2222 -i /home/user/.ssh/privatekey user@HOST:/docs /home/docs

Instead you will need to use the "-o IdentityFile=" option (see man ssh_config):

(CORRECT)  sshfs -p 2222 -o IdentityFile=/home/user/.ssh/privatekey user@HOST:/docs /home/docs

So while the "-o" option works, the "-i" option doesn't. Strange. Perhaps this will change in future versions.</description>
		<content:encoded><![CDATA[<p>For anyone having trouble using keys with names, like me using multiple keys for multiple machines, here&#039;s  a tip. Say this is your key, and your machine only accepts keys, no passwords.</p>
<p>/home/user/.ssh/privatekey</p>
<p>If you try to login using the normal &#034;-i&#034; ssh option, you&#039;ll get the infamous &#034;Connection reset by peer,&#034; and with debug it will show &#034;Permission denied (publickey).&#034;</p>
<p>(WRONG)     sshfs -p 2222 -i /home/user/.ssh/privatekey <a href="mailto:user@HOST:/docs">user@HOST:/docs</a> /home/docs</p>
<p>Instead you will need to use the &#034;-o IdentityFile=&#034; option (see man ssh_config):</p>
<p>(CORRECT)  sshfs -p 2222 -o IdentityFile=/home/user/.ssh/privatekey <a href="mailto:user@HOST:/docs">user@HOST:/docs</a> /home/docs</p>
<p>So while the &#034;-o&#034; option works, the &#034;-i&#034; option doesn&#039;t. Strange. Perhaps this will change in future versions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: misko</title>
		<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-285</link>
		<author>misko</author>
		<pubDate>Wed, 18 Jun 2008 20:00:36 +0000</pubDate>
		<guid>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-285</guid>
		<description>I had same problem "Connection reset by peer" but it was nothing mention before...

Problem was stupid...

My hosting use notdefault port for ssh so in
sshfs  ${ssh_username}@${ssh_server}: ${mount_point}
I had to change to
sshfs -p 23345 ${ssh_username}@${ssh_server}: ${mount_point}

I hope this will help someone...</description>
		<content:encoded><![CDATA[<p>I had same problem &#034;Connection reset by peer&#034; but it was nothing mention before&#8230;</p>
<p>Problem was stupid&#8230;</p>
<p>My hosting use notdefault port for ssh so in<br />
sshfs  ${ssh_username}@${ssh_server}: ${mount_point}<br />
I had to change to<br />
sshfs -p 23345 ${ssh_username}@${ssh_server}: ${mount_point}</p>
<p>I hope this will help someone&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Azulus</title>
		<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-263</link>
		<author>Azulus</author>
		<pubDate>Sun, 04 May 2008 01:20:59 +0000</pubDate>
		<guid>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-263</guid>
		<description>I was having the connection reset by peer issue and as I was tailing auth.log on the ssh-server I saw the following:

May  3 18:22:27 ub3r sshd[19954]: subsystem request for sftp
May  3 18:22:27 ub3r sshd[19954]: subsystem request for sftp failed, subsystem not found

After that happened on the server I'd receive the connection reset error locally. In the server's /etc/ssh/sshd_config, near the bottom there was an sftp subsystem line commented out.  I uncommented it and restarted my SSH server and everything seems to work fine now.</description>
		<content:encoded><![CDATA[<p>I was having the connection reset by peer issue and as I was tailing auth.log on the ssh-server I saw the following:</p>
<p>May  3 18:22:27 ub3r sshd[19954]: subsystem request for sftp<br />
May  3 18:22:27 ub3r sshd[19954]: subsystem request for sftp failed, subsystem not found</p>
<p>After that happened on the server I&#039;d receive the connection reset error locally. In the server&#039;s /etc/ssh/sshd_config, near the bottom there was an sftp subsystem line commented out.  I uncommented it and restarted my SSH server and everything seems to work fine now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamil</title>
		<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-255</link>
		<author>Kamil</author>
		<pubDate>Tue, 22 Apr 2008 01:59:46 +0000</pubDate>
		<guid>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-255</guid>
		<description>good point, ssh server is not installed by default on Ubuntu, thanks Woland</description>
		<content:encoded><![CDATA[<p>good point, ssh server is not installed by default on Ubuntu, thanks Woland</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Woland</title>
		<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-253</link>
		<author>Woland</author>
		<pubDate>Mon, 21 Apr 2008 11:08:44 +0000</pubDate>
		<guid>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-253</guid>
		<description>Hi!

I was just having the same problem,and I was scratching my head as your howto didn't help either. Then suddenly I remembered forgetting to install openssh-server on the server side. :))) Hehe, really simple solution!  
BTW, thanks for the howto!
Woland</description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>I was just having the same problem,and I was scratching my head as your howto didn&#039;t help either. Then suddenly I remembered forgetting to install openssh-server on the server side. :))) Hehe, really simple solution!<br />
BTW, thanks for the howto!<br />
Woland</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: spirit</title>
		<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-252</link>
		<author>spirit</author>
		<pubDate>Fri, 18 Apr 2008 18:07:10 +0000</pubDate>
		<guid>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-252</guid>
		<description>Clear and perfect
many thanks</description>
		<content:encoded><![CDATA[<p>Clear and perfect<br />
many thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamil</title>
		<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-226</link>
		<author>Kamil</author>
		<pubDate>Thu, 27 Mar 2008 03:20:50 +0000</pubDate>
		<guid>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-226</guid>
		<description>The verbose mode of ssh (&lt;b&gt;ssh -v&lt;/b&gt;) gives lots of useful debug info.

From the sshfs man page:
&lt;i&gt;   -o sshfs_debug
              print some debugging information&lt;/i&gt;

On a successful mount it does not print much info:
&lt;i&gt;kamil@kw32:~$ sshfs -o sshfs_debug kamil@rec:/ /mnt/rec
kamil@rec's password: 
Server version: 3
kamil@kw32:~$&lt;/i&gt;

Hopefully it spits out more debug for you.</description>
		<content:encoded><![CDATA[<p>The verbose mode of ssh (<b>ssh -v</b>) gives lots of useful debug info.</p>
<p>From the sshfs man page:<br />
<i>   -o sshfs_debug<br />
              print some debugging information</i></p>
<p>On a successful mount it does not print much info:<br />
<i><a href="mailto:kamil@kw32:~$">kamil@kw32:~$</a> sshfs -o sshfs_debug <a href="mailto:kamil@rec:/">kamil@rec:/</a> /mnt/rec<br />
<a href="mailto:kamil@rec's">kamil@rec&#039;s</a> password:<br />
Server version: 3<br />
<a href="mailto:kamil@kw32:~$">kamil@kw32:~$</a></i></p>
<p>Hopefully it spits out more debug for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ubuntu For Free</title>
		<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-225</link>
		<author>Ubuntu For Free</author>
		<pubDate>Wed, 26 Mar 2008 23:14:54 +0000</pubDate>
		<guid>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-225</guid>
		<description>I'm having no problems with ssh into the box, but I do get the reset by peer error. My keys should all be the same. Is there some kind of a log file I can check to get more specific information</description>
		<content:encoded><![CDATA[<p>I&#039;m having no problems with ssh into the box, but I do get the reset by peer error. My keys should all be the same. Is there some kind of a log file I can check to get more specific information</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamil</title>
		<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-186</link>
		<author>Kamil</author>
		<pubDate>Mon, 25 Feb 2008 05:21:19 +0000</pubDate>
		<guid>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-186</guid>
		<description>Hmm, it is rather tough to fix things without being able to reproduce the problem in the first place. 

Are you using RSA keys throughout (and not some DSA some RSA)?

You can configure ssh to 'not care' about miss-matches between credentials and known_hosts entries, if that were the case then you could ssh even when there was a miss-match. On the other hand (maybe?) sshfs uses a different ssh config (seems unlikely tho). 

I am still leaning towards it being an old key issue... that is easy to check, just remove known_hosts file (but make backup first).

Another suggestion I'll make is to try the ssh 'setup' from GutsyWorking on GutsyNotWorking:
&lt;b&gt;mv .ssh .ssh.orig&lt;/b&gt;
&lt;b&gt;scp -r jimzat@GutsyWorking:./.ssh .&lt;/b&gt;
Then try sshfs again. If that works then look at the differences between the directories using any of the following:
&lt;b&gt;diff .ssh .ssh.orig&lt;/b&gt;
&lt;b&gt;kompare .ssh .ssh.orig&lt;/b&gt;
&lt;b&gt;meld .ssh .ssh.orig&lt;/b&gt;</description>
		<content:encoded><![CDATA[<p>Hmm, it is rather tough to fix things without being able to reproduce the problem in the first place. </p>
<p>Are you using RSA keys throughout (and not some DSA some RSA)?</p>
<p>You can configure ssh to &#039;not care&#039; about miss-matches between credentials and known_hosts entries, if that were the case then you could ssh even when there was a miss-match. On the other hand (maybe?) sshfs uses a different ssh config (seems unlikely tho). </p>
<p>I am still leaning towards it being an old key issue&#8230; that is easy to check, just remove known_hosts file (but make backup first).</p>
<p>Another suggestion I&#039;ll make is to try the ssh &#039;setup&#039; from GutsyWorking on GutsyNotWorking:<br />
<b>mv .ssh .ssh.orig</b><br />
<b>scp -r <a href="mailto:jimzat@GutsyWorking:./.ssh">jimzat@GutsyWorking:./.ssh</a> .</b><br />
Then try sshfs again. If that works then look at the differences between the directories using any of the following:<br />
<b>diff .ssh .ssh.orig</b><br />
<b>kompare .ssh .ssh.orig</b><br />
<b>meld .ssh .ssh.orig</b></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jimzat</title>
		<link>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-185</link>
		<author>jimzat</author>
		<pubDate>Mon, 25 Feb 2008 04:10:26 +0000</pubDate>
		<guid>http://linux.dsplabs.com.au/sshfs-read-connection-reset-by-peer-p73/#comment-185</guid>
		<description>I am getting the "read: Connection reset by peer" message also when I attempt to sshfs from one of my Gutsy boxes into a Dapper box.  (The connection from my other Gutsy box to  Dapper is OK.)  But when I ssh from the Gutsy boxes into Dapper everything is fine with no warnings.

This doesn't appear to be an RSA key issue, what else could it be and how should I diagnose it?

jimzat</description>
		<content:encoded><![CDATA[<p>I am getting the &#034;read: Connection reset by peer&#034; message also when I attempt to sshfs from one of my Gutsy boxes into a Dapper box.  (The connection from my other Gutsy box to  Dapper is OK.)  But when I ssh from the Gutsy boxes into Dapper everything is fine with no warnings.</p>
<p>This doesn&#039;t appear to be an RSA key issue, what else could it be and how should I diagnose it?</p>
<p>jimzat</p>
]]></content:encoded>
	</item>
</channel>
</rss>
