2

Trying to copy a file from RPi to my PC:

$ scp MyFile.pdf [email protected]:~ 

ssh: connect to host 192.168.0.83 port 22: connection refused

lost connection

When copying the same file from my PC it works fine:

$ scp [email protected]:/home/pi/Downloads/MagPi46.pdf /home/user/Desktop/
[email protected]'s password: 
MagPi46.pdf                              100%   21MB   1.0MB/s   00:21

Is there a reason to why the file can be copied from PC to PC and not from RPi to PC ?

5
  • Is your Pi running an SSH server?
    – muru
    May 27, 2016 at 8:04
  • don't know, how to find out ?
    – Greg
    May 27, 2016 at 8:04
  • I think Pi is running SSH server cause I can connect to it with ssh command
    – Greg
    May 27, 2016 at 8:14
  • Is your PC running SSH server, when you want to connect to it?
    – Jakuje
    May 27, 2016 at 8:45
  • Yes, I am connected to RPi with SSH while trying to copy
    – Greg
    May 27, 2016 at 8:48

1 Answer 1

3

Your Pi is running an ssh server. Your PC is not. Both have ssh clients available. There are numerous ssh server packages available, but I don't know what kind of machine you are running on to recommend one. A simple Google "install ssh server 'machine type, i.e., Linux'" should suffice.

To test that it works on the machine you install it on, you can usually ssh user@localhost and not see that error message.

If you do have one installed, make sure that the port (22) is actually open on your firewall.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .