No SSH after port change

My YunoHost server

Hardware: VPS bought online / Other ARM board / …
YunoHost version: x.x.x
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen | …
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Hello everyone…

Have I missed something?

Today I attempted to change the port number of my YNH box. I followed the instructions here…

Everything went ok in that I was able to edit and create the required files. Restarted the SSH and Fail2Ban services.

Tried to SSH locally with:

ssh -pxxxx

however… nothing. I couldn’t connect via ssh. Fortunately, my VM takes snapshots so I was able to go back to the original setup. Whew!

I have to ask the question. Are the instructions correct? If they are I will try again but I was pretty thorough as I was nervous.

Best wishes


ssh -pxxxx

There should be a space between p and the port number.

however… nothing. I couldn’t connect via ssh.

Do you have… uh… an actual error to share?

It has been a while since I followed this tutorial myself. Assuming you followed all the commands to the letter, can you try again? This time, do not close you initial SSH session. It will help you keep access to the server (despite having restarted the ssh service) and debug what is wrong.
Open a new window to your favorite terminal and try connecting again over there. Report back any error you receive.


Thanks @tituspijean for the reply…

Yes I see the space now that I look again at the doc… Doh!

No error showed up.

Here we go. Trying again…



It was a couple of things:

Yes the space was missing in the -p but also I did miss the single line about "dis-allowing the old port number in the firewall’. Don’t know how I missed it because I did the preceding line. Cat came into the room at that point I think. Easily distracted! :smiley_cat:

Thanks very much :+1:

Issue resolved.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.