I connected to Ubuntu server from my Mac terminal using ssh root@555.555.55.55
(not the real IP address), then I got an error ssh: connect to host 555.555.55.55 port 22: Connection refused
. After that I tried the command ssh root@555.555.55.55 -p 55555
, then I got the message root@555.555.55.55: Permission denied (publickey)
.
Before changing the port number I have installed ufw and I changed the port number using sudo nano /etc/ssh/sshd_config
.
Now I'm not able to connect to my server. Can anyone help me out.
ssh -v root@555.555.55.55 -p 55555
for more useful diagnostic output. – user535733 Nov 06 '22 at 14:29root
password is not set you need to use SSH public key authentication to login toroot
by default. You should SSH in as a non-root sudo-enabled account and then usesudo
on your sudo-enabled account to execute commands as admin. – Thomas Ward Nov 06 '22 at 18:26