I use my Raspberry pi to connect a server using SSHFS, mounting a folder on the server to a folder on my Pi. My pi acts as a client. My Pi's OS is Linus. I use cable to connect the network, not WiFi

My connecting code is : ssh pi@IPaddress

However, after around 20 seconds, there is no response. It just shows 'Write failed; Broken pipe.'

I tried adding some 'TCPKeepAlive no','ServerAliveInterval 10' and 'ServerAliveCountMax 200' in my ~/.ssh/config, /etc/ssh/ssh_config, /etc/ssh/sshd_config.

After rebooting my Pi, it still disconnected after several seconds.

Does anyone know how to fix it? Thanks!

  • are you sure that there's not a problem with your server?
    – honi
    Aug 10, 2017 at 0:01
  • Yeah. I'm pretty sure. I can use my mac to connect my server. At least in one day, it connects successfully without any disconnection.
    – Tian Xie
    Aug 10, 2017 at 17:10
  • what are the usernames on your server? do you have a server user named pi? if not, you should use ssh username@ipaddress
    – honi
    Aug 11, 2017 at 17:52
  • Yeah, my server has a name pi...
    – Tian Xie
    Aug 11, 2017 at 22:07
  • can you access the rest of the internet from the pi?
    – honi
    Aug 13, 2017 at 2:10

1 Answer 1


I tried to use a local network, mounting to the IP address with the same first three parts. Then it can connect for a long time. Therefore, I thought it should be my network issue. I'll try to use wifi to see if my network works or not! Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.