Introduction ¶
Secure Shell - de facto standard way to get access to a remote terminal on an virtual server. On the computer where you need to get access, SSH server is installed, and on the computer where the operator works, SSH client is installed. Through SSH we can:
- Transfer files
- Execute commands on the target server
- Get information about the target system and perform simple automation
On Linux and MacOS, we have a terminal - SSH, which is usually set up by default. For Windows, I used the following options:
- MobaXTerm - convenient, but paid. Suitable for non-commercial use, but you’ll need to buy a license if you want to use it in a company. Advantages:
- Immediately provides a file manager with drag-n-drop files to the target system
- Normal keyboard support and RSA key support
- Git - when setting up Git, it includes Git Bash and an SSH client. Very close to the usual Bash.
Connecting ¶
|
|
The port is optional, defaulting to 22, but it’s highly recommended not to run the SSH server on the standard port, as the world is full of automated bots that scan networks and find virtual machines with SSH on the standard port and simple passwords, trying to add them to some botnet. I once fell for this, but it’s a different story…
Copying Files ¶
To copy files to the target host, you can use scp.
|
|
Note:
- The port for scp is specified using
-P
, whereas for ordinary SSH --p
. - The folder on the target machine should belong to the user you’re connecting with, or you’ll need permission to write to that folder\file.