Glam Prestige Journal

Bright entertainment trends with youth appeal.

Having problems copying the directory contents:

PC A: Linux pc with a folder containing images (/usr/share/a/images) PC B: Windows pc with a shared folder call B (192.168.1.2)

I'm using PC B, using putty to open a ssh session on PC A. entered the username and password and manage to get to the terminal

then i try to do the directory copy:

admin@abc-ace:~$ scp -r /usr/share/a/images 192.168.1.2:/B/
ssh: connect to host 192.168.1.2 port 22: Connection refused lost connection

anyone knows whats wrong? and is my command for scp wrong?

4

1 Answer

anyone knows whats wrong?

Your windows PC isn't an SSH server but client.

and is my command for scp wrong?

Your command would work if you would set up SSH server on Windows PC, but you don't actually need to do that if a task is just a copy content over SSH from Linux computer to Windows PC.

If you downloaded all programs that comes with PuTTY then there is program called PSCP.exe that you need to use on Windows PC for copy from remote machine to windows over SSH:

PSCP.EXE -r :/usr/share/a/images C:\Users\Public\Downloads

If you didn't downloaded all PuTTY package, then you can download PSCP.EXE here

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy