First check to see if Openssh-server is started:
PS grep SSH
If there is no prompt then it is not started:
sudo/etc/init.d/ssh
Start the process. If you are prompted to find a command, you need to install Openssh-server:
sudo Install Openssh-server
In addition, openssh-client Ubuntu is already installed by default and can be installed with the following command if not installed:
sudo Install openssh-client
You can then transfer the file using the Scp/rsync command.
SSH [email protected] ' s IP (eg. 192.168. 0.1
#SSH Remote login Ubuntu Machine
SCP -R [email protected]192.168. 0.1:/home/username/
# Copy files/folders from the remote Ubuntu machine to local (SCP)
SCP -R localfile.txt [email protected]192.168. 0.1:/home/username/
#
# copy files / folders from the remote Ubuntu machine to local (rsync)
-v-u-a–delete–rsh=ssh –stats localfile.txt [email protected]192.168. 0.1:/home/username/
#
The SCP command can be used to transfer files between machines through secure, encrypted connections. It is similar to RCP.
The general syntax for transferring local files to a remote system is:
SCP localfile [email protected]:/
LocalFile Specify the source file, [email protected]:/newfilename Specify the destination file.
To transfer the local file Shadowman to your account on Penguin.example.net, type (replace the username with your username) at the shell prompt:
Scp
This will transfer the local file Shadowman to the/home/username/shadowman file on Penguin.example.net. The general syntax for transferring remote files to the local system is:
SCP [Email protected]:/remotefile/
The source file can consist of multiple files. For example, to transfer the contents of the directory/downloads to the existing uploads directory on the remote machine penguin.example.net, type the following command at the shell prompt:
SCP /downloads/* [email protected]:/uploads/
Reference:
http://blog.163.com/wz_pk007/blog/static/170627050201251431325833/
http://asyty.iteye.com/blog/1440141
Transfer data directly between two Ubuntu with a command