To look at a server from the inside, log in to it. ssh connects to the machine's port 22 and gives you a shell there: everything you type runs on that machine until you exit.
New command
ssh
Logs in to a machine as the same user. The first time, it asks whether to trust the machine's key: type yes.
Usagessh machine
text
learner@ops:~$ ssh web
The authenticity of host 'web (10.0.0.10)' can't be established.
ED25519 key fingerprint is SHA256:UGGZMATEG7I/V9TM2HJGUY8n6yQr6KA1BOS4OworkWU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'web' (ED25519) to the list of known hosts.
…ssh keeps the key in ~/.ssh/known_hosts and checks it at every login after, so it only asks once. The prompt names the machine you're on: at learner@web, everything runs on web.
text
learner@web:~$ exit ← back to ops
logout
Connection to web closed.Objectives
- Log in to web.
- Log in to db from ops.