# sshfs connection reset by peer

## carpman

Hello, trying to mount my gentoo desktop from kbuntu laptp via sshfs but get connection reset by peer error, i can do fine the other way around though.

sshd_config on gentoo is

```

Port 22

Protocol 2

ServerKeyBits 2048

SyslogFacility AUTH

LogLevel INFO

LoginGraceTime 60

PermitRootLogin no

RSAAuthentication no

PubkeyAuthentication yes

AuthorizedKeysFile      .ssh/authorized_keys2

PasswordAuthentication yes

PermitEmptyPasswords no

#PAMAuthenticationViaKbdInt no

Compression yes

KeepAlive yes

ClientAliveInterval 30

ClientAliveCountMax 4

Subsystem       sftp    /usr/lib64/misc/sftp-server

```

have edited /etc/fuse.conf to allow non root users

Am i missing something?

cheers

----------

## kipibenkipod

Your mount point is correct?

Kfir

----------

## elko

Are you able to connect to your desktop from your laptop using ssh? Any complaints about spoffed identity or something like that?

----------

## carpman

Hello, yes mount points are correct and yes i do ssh fine.

cheers

----------

## kipibenkipod

fuse kernel module is loaded in the server?

Kfir

----------

## carpman

 *kipibenkipod wrote:*   

> fuse kernel module is loaded in the server?
> 
> Kfir

 

Is built into kernel

----------

## kipibenkipod

Try to do a simple test without any options. Just from the command line.

mkdir /tmp/testmnt

ssh server mkdir /tmp/test

sshfs server:/tmp/test /tmp/testmnt

Now try it again after you stop your firewall on the server.

Regards,

Kfir

----------

## carpman

Hello, ok think this a firewall issue.

I run my network via a smoothwall box so my wireless (laptop) is in dmz and is pin hold into rest next by opening required ports in firewall.

If connect my laptop via wired connection then i can mount with sshfs fine, but soon as connect with wireless i cannot?

Thing is i can do ssh fine via wireless so there must be something i am missing?

I thought sshfs used same port as ssh?

cheers

----------

## kipibenkipod

 *carpman wrote:*   

> Hello, ok think this a firewall issue.
> 
> I run my network via a smoothwall box so my wireless (laptop) is in dmz and is pin hold into rest next by opening required ports in firewall.
> 
> If connect my laptop via wired connection then i can mount with sshfs fine, but soon as connect with wireless i cannot?
> ...

 

Yep, it seems like the firewall, but it also odd, because sshfs is wrapped inside ssh. Ok.

What I would do, is open a terminal running the log in the firewall like this

```
tail -f /var/log/firewall.log
```

Then in another terminal try to mount with sshfs.

Then you will see what the firewall does when you do the mount. 

Regards,

Kfir

----------

## carpman

Thanks for replies.

Check the smoothwall logs and found

```

Source         Src Port         Destination         Dst Port

192.168.50.3       46542        192.168.1.5        22(SSH)

192.168.50.3      44531             192.168.1.5           22(SSH)

```

192.168.50.* is wireless network 192.168.1.* is wired.

seem it is not just using port 22 ?

----------

## kipibenkipod

 *carpman wrote:*   

> Thanks for replies.
> 
> Check the smoothwall logs and found
> 
> ```
> ...

 

Why not? Its the Destination port that is important which is 22. The source computer use different ports to initiate the connection. No problem here.

Please do the check with 2 xterms open. One is ssh to the firewall running 'tail -f firewall.log' and the other xterm you ssh from wireless and sshfs from wireless. 

Regards,

Kfir

----------

## carpman

Thanks for help but have solved it now.

My wireless is in firewall dmz  so have open pin holes for each service to specific ips, i had not done so for my desktop but what was throwing me was i could could connect via ssh, which i should not have been able to without pin hole.

So cured one issue but now have workout why ssh worked?

cheers

----------

