To connect to a remote host:
Attention:
After the SSH session is disconnected, the process ends, and if you need to continue the process of the remote host running after the SSH session is disconnected, you need to use screen:
First you need to install screen:
Installing screen directly with Apt-get: sudo apt-get install screen
Then use the SSH command to connect to the remote host:
SSH (-p portnum) [email protected]
Then create a screen virtual session:
Screen-s Name
If you disconnect the SSH connection at this time, after reconnecting the remote host with the SSH command, use screen to restore the previous session:
Screen-r Name
Note the name used two times is the same and can be modified to something else (test, etc.), but the same name is required for creation and recovery.
To transfer files to and from a remote host:
SCP from to
If you get files from a remote host to Local:
SCP (-P portnum) [email protected]:/abspath This secondary path
Upload from local to remote host:
SCP Current path (-P portnum) [email Protected]:/abspath
Linux Remote Operations Command SSH SCP