Server Login
Server Login
How to connect and log into a Linux server
What is Server Login?
Server login is the process of authenticating and gaining access to a remote Linux server. This is typically done over SSH (Secure Shell), which provides an encrypted connection.
- Servers are usually accessed remotely over a network
- SSH is the standard protocol for secure remote login
- You need a username, password or SSH key, and the server's IP address
SSH – Logging Into a Server
Basic SSH login command
ssh username@server_ip_addressExample
[local]$ ssh root@192.168.56.101
root@192.168.56.101's password:
Last login: Sat Oct 17 15:29:00 2020
[root@localhost ~]#- Type your password when prompted (it won't be visible)
- After login, you will see the server's command prompt
SSH with Custom Port
By default SSH uses port 22. If the server uses a different port, specify it with -p
ssh -p 2222 root@192.168.56.101PuTTY – Windows SSH Client
PuTTY is a popular SSH client for Windows users to connect to Linux servers.
- Download PuTTY from putty.org
- Enter the server IP address and port (default 22)
- Select SSH as the connection type
- Click Open and enter your credentials
Host: 192.168.56.101
Port: 22
Connection type: SSHFirst-Time Login Warning
The first time you connect to a server, SSH will show a fingerprint warning. Type yes to accept and continue.
The authenticity of host '192.168.56.101 (192.168.56.101)' can't be established.
RSA key fingerprint is SHA256:abc123xyz...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.56.101' to the list of known hosts.- The fingerprint is saved in
~/.ssh/known_hosts - Future connections won't show this warning
Logging Out
To safely end your SSH session, use one of these methods:
[root@localhost ~]# exit
logout
Connection to 192.168.56.101 closed.Or press Ctrl + D to logout instantly.