2

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.

muru
  • 197,895
  • 55
  • 485
  • 740
Mario Kamenjak
  • 1,043
  • 3
  • 16
  • 25

2 Answers2

8

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

muru
  • 197,895
  • 55
  • 485
  • 740
Ron
  • 20,638
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
Mike
  • 5,691