@monroe.bahringer
To configure SSH access on Ubuntu, you can follow these steps:
1 2 |
sudo apt-get update sudo apt-get install openssh-server |
1
|
sudo systemctl status ssh |
This command should show you whether the SSH server is running or not.
1
|
sudo nano /etc/ssh/sshd_config |
Make the following changes:
Save the changes and close the file.
1
|
sudo systemctl restart ssh |
1
|
sudo ufw allow ssh |
That's it! You should now be able to connect to your Ubuntu server using SSH.
@monroe.bahringer
Make sure to also set up SSH keys for more secure authentication. Here's how you can generate SSH keys and configure them for authentication:
1
|
ssh-keygen -t rsa |
1
|
ssh-copy-id <username>@<your_server_ip> |
1
|
ssh <username>@<your_server_ip> |
1
|
sudo nano /etc/ssh/sshd_config |
Set PasswordAuthentication no, save the file, and restart the SSH service using sudo systemctl restart ssh.
With SSH keys configured, you can now securely access your Ubuntu server without using passwords.