parlays
asked on
Using SSH can I quickly copy between my local HD and the remote server?
Hello everybody!
I am running Ubuntu, and using my terminal to ssh into a remote server. What is the best way to transfer files between the remote server and my local hard drive.
I tried using 'scp' and it only seemed to work if I am running it on my local computer and not while I am SSHing. Any ideas or recommendations?
I am running Ubuntu, and using my terminal to ssh into a remote server. What is the best way to transfer files between the remote server and my local hard drive.
I tried using 'scp' and it only seemed to work if I am running it on my local computer and not while I am SSHing. Any ideas or recommendations?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
the above command should be run on your local desktops terminal.
ASKER
What i would like to do is to SSH into the remote server. From there I would like to type a command to copy files from my local hard drive? When I try using SCP, I have no idea what to type as the source because my local hard drive doesn't have a domain name. You know what I mean.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How do I do it the other way around? Once I am SSHed into the remote server how do I copy from my local hd?
If you are on the remote server, you do
scp user@you-local-server:/pat h/to/files * /some/path
scp user@you-local-server:/pat
ASKER
'your-local-server' ?
That's what I need to figure out.
What is my local server? 'localhost'? i'll try that, but isn't there a way to specify to grab from my local drive other than using a server name?
That's what I need to figure out.
What is my local server? 'localhost'? i'll try that, but isn't there a way to specify to grab from my local drive other than using a server name?
Use the IP. 'localhost' is always the local system, in context. That means if you SSH into the remote server, 'localhost' means the remote server's local system.
ASKER
Gotcha, i'll get my IP address of the router, checking what it is with 'ifconfig'. Is that correct?
I'll test it out tomorrow, thanks for your help.
I'll test it out tomorrow, thanks for your help.
You don't want the IP address of your router, unless your local server also acts as the router.
If you are behind a firewall and/or have a NATed address, then you are going to run into difficulties.
If you are behind a firewall and/or have a NATed address, then you are going to run into difficulties.
ASKER
Well picture my setup. I'm on a laptop running Ubuntu connected to the internet through a router.
I connect to a remote server using the terminal, and now using SSH on the remote server I want to copy a file from my local hard drive on the laptop.
The laptop i'm using I don't think has an IP address? Can I connect to it? Or is the only way to use 'scp' from the local hard drive to the remote server?
I connect to a remote server using the terminal, and now using SSH on the remote server I want to copy a file from my local hard drive on the laptop.
The laptop i'm using I don't think has an IP address? Can I connect to it? Or is the only way to use 'scp' from the local hard drive to the remote server?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cool, I hear ya. I'm just trying to see what is possible and learn the best way to copy files. Still new to using these tools.
I have no prob copying from the local to the remote server. Thanks for all the help and responses fellas.
I have no prob copying from the local to the remote server. Thanks for all the help and responses fellas.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Any progress on this side? Did you test the tunnel solution?
Do you get any error messages?