I connected to Ubuntu server from my Mac terminal using ssh [email protected]
(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 [email protected] -p 55555
, then I got the message [email protected]: 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 [email protected] -p 55555
for more useful diagnostic output.root
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.