I'm trying to test some C code that I'm writing. The only issue is that the code needs to be executed on a remote machine. My laptop is pretty old, and there is no driver for my wireless card available for Ubuntu, so booting into Linux to circumvent this problem isn't an option. Here's my question:
I'm using putty to SSH into the remote machine, and I'm writing my code on Notepad++.
The location of my file is:
C:\Users\Admin\Desktop\WMU\5260\A2.c
My problem is that when I use the command scp C:\Users\Admin\Desktop\WMU\5260\A2.c ~
I get the error could not resolve hostname C:. Name or service not known".
I've also tried scp Users\Admin\Desktop\WMU\5260\A2.c ~
which gives me the error Cannot stat 'Users\Admin\Desktop\WMU\5260\A2.c': no such file or directory
What am I doing incorrectly?
Use scp priv_key.pem source user@host:target
if you need to connect using a private key.
or if using pscp then use pscp -i priv_key.ppk source user@host:target
You can use PSCP to copy files from Windows to Linux.
Type command pscp source_file user@host:destination_file
pscp sample.txt [email protected]:/mydata/sample.txt
Source: Stackoverflow.com