Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated
SSH is a mechanism for operating a server from a distant place over encrypted communication. The name is short for Secure Shell. RFC 4251 describes it as a standard for using remote login and other services safely even over an untrusted network.
How does SSH work?
Compare it with entering the vault room of a far-off office through a private passage that cannot be peeked into, with an identity check at the entrance. The passage is the encryption, and the check at the entrance is authentication. You also first make sure that the office at the end of the passage is the genuine one.
According to RFC 4251, SSH is made of three layers. The first checks the destination server, encrypts the communication, and detects tampering. The second checks the connecting user, and the third divides one passage among several uses. The MIC glossary explains that with SSH the contents of communication are encrypted, so you can operate safely even across the internet.
Whether the destination is genuine is checked with the server's public key. For that, RFC 4251 says the connecting side must know the other party's key in advance. There is a method of keeping a table of keys at hand and a method in which a certificate authority certifies them. A practice of not checking the key at the first connection is possible, but the RFC warns that it is strong against snooping and weak against attacks that cut into the communication.
The check of the user is set out in RFC 4252. Public key authentication shows the person by a signature made with a secret key, and it is a required method that every implementation supports. Password authentication is an optional method. It is written that the secret key is often stored encrypted and a passphrase is typed each time it is used.
Whether the entrance is exposed to the outside is set out in exposed ports. The free URL check looks only at the outside of your site, and it does not scan ports.
Why does SSH matter?
SSH is an entrance through which the inside of a server can be operated directly. If it is broken, tampering with the site and the taking of information follow directly. Even at a small company that uses a rental server or a VPS, the operator or the production firm may use it to change server settings and update files.
The basics of defense are strengthening authentication and narrowing the entrance. Authentication by password alone is easily affected by guessing and reuse. If you switch to public key authentication, keeping the secret key becomes the heart of the defense. The thinking about keeping keys is in public key cryptography.
You also need settings that open the entrance only to the parties that need it. The method of trying logins by repeated guessing is covered in brute-force attacks. The explanation of exposed ports helps in sorting out entrances left open to the outside. If you want help reviewing your settings, contact us.
Related terms
- Public key cryptography: a cipher method that uses a public key and a secret key as a pair
- Exposed ports: the state of an entrance left open to the outside
- Brute-force attack: an attack that tries passwords one after another
- Key management: the operation of making, keeping, and replacing encryption keys
Frequently asked questions
Can SSH be used with only a password?
Yes. RFC 4252 treats password authentication as an optional method, and rules public key authentication a required method that every implementation supports. With public key authentication, being the owner of the secret key is confirmed by a signature.
May I skip the confirmation shown on the first connection?
Do not skip it. RFC 4251 says that a practice of not checking the destination's key at first connection prevents snooping but leaves you open to attacks that cut into the communication. Go ahead after confirming over another route that the destination's key is right.
Next step
Ask your contractor to whom your server's SSH entrance is open. How to see entrances left open is in exposed ports. The free URL check reads public information only, and for a review of who can reach your SSH entrance, contact us.
Frequently asked questions
Can SSH be used with only a password?
Yes. RFC 4252 treats password authentication as an optional method, and rules public key authentication a required method that every implementation supports. With public key authentication, being the owner of the secret key is confirmed by a signature.
May I skip the confirmation shown on the first connection?
Do not skip it. RFC 4251 says that a practice of not checking the destination's key at first connection prevents snooping but leaves you open to attacks that cut into the communication. Go ahead after confirming over another route that the destination's key is right.