Lemaum
Posts: 2
Joined: Thu Apr 06, 2017 9:15 pm

Can't access "/home/pi" using SFTP

Thu Apr 06, 2017 9:54 pm

I bought a RPI3 today and started setting it up, the first thing I did was to enable the SSH connection, PuTTY worked perfectly, but when I tried to connect using WinSCP and FileZilla, they timed out. So I changed the default SFTP home directory in the "sshd_config" file and I was able connect, but I can't access the "/home/pi" directory, everytime I try to do that the apps time out. I searched on Google but didn't find anything to solve my problem. Does anyone knows how to fix this?

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Can't access "/home/pi" using SFTP

Thu Apr 06, 2017 11:04 pm

I don't have a problem using FileZilla and sftp. I entered the IP, user 'pi', password and port 22, then "Quick Connect".

Got a firewall installed? I do. I had to let port 22 from my localnet through the firewall.

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Can't access "/home/pi" using SFTP

Thu Apr 06, 2017 11:15 pm

I'd undo your changes to the sshd config files. If you login with user=pi then your default directory will be /home/pi (based on what ever is in /etc/passwd).

Code: Select all

C:\Users\xxxx\AppData\Local\Temp>"c:\Program Files (x86)\PuTTY"\psftp pi@192.168.3.14
Using username "pi".
pi@192.168.3.14's password:
Remote working directory is /home/pi
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: Can't access "/home/pi" using SFTP

Thu Apr 06, 2017 11:25 pm

Lemaum wrote:I bought a RPI3 today and started setting it up, the first thing I did was to enable the SSH connection, PuTTY worked perfectly, but when I tried to connect using WinSCP and FileZilla, they timed out. So I changed the default SFTP home directory in the "sshd_config" file and I was able connect, but I can't access the "/home/pi" directory, everytime I try to do that the apps time out. I searched on Google but didn't find anything to solve my problem. Does anyone knows how to fix this?
I've just done a clean install of the 2017-03-02 release and upgraded:

Code: Select all

root@raspberrypi:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@raspberrypi:~# uname -a
Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
root@raspberrypi:~#
I can winscp (version 5.9.4 build 7333) without any problems to raspberrypi.local as user pi ( I left login folder as <none>)

Lemaum
Posts: 2
Joined: Thu Apr 06, 2017 9:15 pm

Re: Can't access "/home/pi" using SFTP

Wed Apr 12, 2017 11:09 pm

Thank you guys, I solved that problem. For some reason my router's WiFi was blocking the bigger files to transfer, when I connected my Pi to it by the cable everything worked perfectly.

Return to “Troubleshooting”