The shell displays a string when it is waiting for user input, named the shell prompt. When a regular user starts a shell, the prompt includes an ending dollar sign ($
):
user@host:~$
When the shell is running as the superuser (the root
user), the prompt includes an ending number sign (#
):
root@host:~#
Console
실제 첫 콘솔 로그인은 tty1
를 사용하고 이후에는 virtual console을 사용하는데,
tty2
~ tty6
중에 하나 사용
For administrators to log in, a login prompt for a headless server might be provided by its serial console, which runs on a serial port that is connected to a networked console server for remote access.
SSH
user@host:~$ ssh -i mylab.pem remoteuser@remotehost
remoteuser@remotehost:~$
고려사항
- OpenSSH blocks the private key from being used if the file’s permissions are incorrect
chmod 600
When you first log in to a machine, the remote host does not know your keys, so you are prompted with a warning from SSH that it cannot establish the authenticity of the host:
user@host:~$ ssh -i mylab.pem remoteuser@remotehost
The authenticity of host 'remotehost (192.0.2.42)' can't be established.
ECDSA key fingerprint is 47:bf:82:cd:fa:68:06:ee:d8:83:03:1a:bb:29:14:a3.
Are you sure you want to continue connecting (yes/no)? **`yes`**
remoteuser@remotehost:~$
한번 로그인하고 나서는 local에서 known_host에 host들이 어떤 키 교환을 했는지 저장해두고 활용함