How to copy a file from a remote computer?
I have connected to a remote computer by SSH. Mine is fedora and the remote is centos.
I want to copy a file from the remote to mine. Please let me know the command. Also, please let me know how to mention the destination. I don't know how to mention myusername@mycomputer :\ |
Code:
scp /path/to/file myusername@mycomputer:/path/to/dir/forfile/ |
Quote:
|
can't
I do not know your username or the External IP of your computer Assuming you connect through a router you would need to either use VPN or forward a port to your computer might be easier to do it the other way round on your computer Code:
scp remoteusername@remotecomputerIP:/path/to/file /path/to/dir/forfile/ |
I am using a laptop. I just don't know the myusername and mycomputername. I just need to find them. Are there any commands that can help me find them?
|
might be easier to do it the other way round
Code:
scp remoteusername@remotecomputerIP:/path/to/file /path/to/dir/forfile/ and honestly, if you don't know your own username, you are in trouble. I accept that finding out your IP address might be a challenge a websearch for "whats my IP" might help configuring your router to forward ports, refer to router manual Warning: port forwards are best left alone unless you know what you are doing |
its no different in linux then any other OS out there in the world. yourusername is the name you log in with. thus your user name.
as for the computer name, that is the IP address of your laptop, or if you are using a properly configured local DHCP server with DNS, then your fully qualified domain name will work too. as clear as firerat stated we can not tell you those things, we are not you. you can always open your terminal and type in "whoami" without the " " and it will tell you your user name. as for the ip: thats also simple from the terminal. switch to root user and type: "ifconfig" again without the " " and you will be able to find your IP. computers are computers mate. Linux, MS, OSx, BSD, they all require a user name of some type and some means of identifying who they are on the network. |
actually
I did assume your remote computer wasn't on your LAN in which case, you can find the ip with Code:
/sbin/ifconfig Code:
mint@mint-VirtualBox ~ $ /sbin/ifconfig |
All times are GMT -5. The time now is 03:29 PM. |