1

Let's say I have 2 pc's set up on a wireless network.

Machine A is my daily driver and it uses Ubuntu 15.04 Machine B is an old pc I want to set up as an ssh server with Debian LXDE(but it boots to terminal).

How do I copy files from machine A to machine B.

  • If you want two-way communication then install open-ssh server on both..openssh-client is installed by default..the use scp, or rsync or plain ssh.. – heemayl Jul 9 '15 at 15:25
  • yeah but aside from the installation what are the actual commands for file transfer, which method is the best/easiest? – Mario Kamenjak Jul 9 '15 at 15:29
  • I suggest you look at How to setup a restricted SFTP server on Ubuntu? it has more details than you asked for but it also explains how to connect via GUI and make the setup more secure. – LiveWireBT Jul 10 '15 at 21:43
2

If you prefer GUI you can also install openssh-server on machine B, it can be setup from terminal, and use FileZilla on machine A to connect to machine B. FileZilla will allow you to visually explore file structure, browse directories, copy, move files and directories and it supports login with keys without passwords.

To install openssh-server

sudo apt-get install openssh-server

To install FileZilla

sudo apt-get install filezilla
6

You can use scp as in:

scp <file> <username>@<IP address or hostname>:<Destination>

In addition, with the -r flag, you can recursively copy files.

You can also use rsync which can resume transfers if the connection breaks, and it intelligently transfers only the differences between files:

rsync -avz -e 'ssh' /path/to/local/dir user@remotehost:/path/to/remote/dir
  • -a archive

  • -v verbose

  • -z compress

  • -e ssh "use a SSH tunnel"

Refer:

  1. https://help.ubuntu.com/community/SSH/TransferFiles

  2. How to use ssh to transfer files from computer a to local computer

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.