Monday, January 21, 2013

How do I upload a folder recursively via SSH through a linux terminal?

Q. The problem is quite simple actually. I have a folder in my desktop which I want to be able to upload to my server via SSH. I want to be able to do that using only the linux terminal. Thanks
I don't know about import/export functions. I just want to upload via SSH. I know it's possible, I just don't know how.

A. See the SCP command (syntax in source link). It copies files over ssh. As you can see, it has an option to put an entire folder over at once.

Alternatively, there's SFTP (secure-ftp) which tunnels a ftp connection through ssh (valid only if the target server also has ftp service in addition to ssh).

How do I transfer files to and from my computer I'm remotely connected to through SSH?
Q. I want to be able to transfer files to and from my home computer remotely while accessing it from an SSH connection...How do I do this? Do I need to set up an FTP server on my home computer? It's running Debian Linux and I access it from my Android phone using ConnectBot.

A. If it's running an ssh server that will include scp and usually sftp.
You can connect with any scp/sftp client like winscp, rsync. If you set up SSH keys access you need not bother with passwords (though it's still a good idea to have some passphrase in case you lose the phone)

ftp is less secure, unless you use SSL

I am accessing my home linux box remotely from work. How can I copy files from that linux comp to my local com
Q. I am accessing my home linux computer remotely from my MacBook via SSH. I am behind a NAT, so I don't have a static IP. I want to retrieve some files from that linux box to my MacBook. Is there a reverse SCP command that I can use so that I can SCP the file from my home linux box to my MacBook at work through the already established tunnel?

A. You use scp direct (not through the tunnel). It can copy either way. One option is to log in to your Linux box through ssh, then use scp to the Mac from there. you would need the address of the mac, and forwarding set up at its' router. Alternatively use the scp from the mac console to your Linux machine. You must have its' address if you can ssh to it.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

No comments:

Post a Comment