I am currently working on a windows 10 laptop. I have installed the ubuntu subsystem (instead of PUTTY) in it to access the remote server. When I launch the ubuntu subsystem from my windows start menu, it opens with a command prompt user@PC01Y21-PC

The remote server is a Linux server as well.

In addition, I am connected to a VPN. If I don't connect to the VPN, I will not be able to login to the remote server.

So, what I would like to do is download the file from a remote server to my laptop

  1. From ubuntu subsystem, I use SSH 9 (IP address of remote server)

  2. Later I navigate to the path where the file is

  3. I type pwd to get the path of the file

  4. Later I type the below command

    scp selva@ user@PC01Y21-PC:/home/user/

I was expecting that this command would work and the file would be saved in the user folder of ubuntu subsystem but I get the below error

ssh: Could not resolve hostname pc01y21-pc: Name or service not known
lost connection

I would like to copy the map.csv file to the /home/user/ folder in ubuntu system.

Later, I will move it to /mnt/c/ folder so I can access it from my laptop

Can help me please?

| |
  • 1
    Your PC PC01Y21-PC is unknown from your server without some sort of dynamic DNS update or some broadcast forwarding wizardry. Instead, from your ubuntu subsystem do: scp selva@ /home/user/anywhere_you_want – Laurent Gosselin Jul 14 at 14:40

Try using the following as you don't need to mention the local computer name:

scp selva@ /home/user/

| |
  • upvoted for the response – The Great Jul 18 at 16:29

Your Answer

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

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