0

I'm not using Port 22 for my SSH but something above 47000
I have ufw (uncomplicated firewall) installed and have unblocked "ssh" and "http"

When I look into the current ufw status he says that Port 22 and Port 80 are allowed from everywhere. I configures this thing via SSH

My SSH connection wasn't interrupted by it. Even tho I'm not using Port 22 for my SSH. Not I've unlocked that special port for 47000+ too. Now I have both ports open on as well IPv4 and IPv6

Do I need to have both unlocked? Can I delete the Port 22? I wouldn't ask this question if my SSH connection would have collapsed but now I'm confused what Port SSH really uses

Is the 47000+ Port only used for the handshake?
I'm sorry for this (near-to-irrelevant) question but I fear that I might never be able to SSH to my server again when I have a wrong Firewall config

  • In cases like this, it is recommended to first bring up a second SSH connection on another port, so that if you lose the first port by mistake, you can still reach your server. – Jos Oct 24 '15 at 15:12
0

Do I need to have both unlocked?

No.

Can I delete the Port 22?

Yes.

I wouldn't ask this question if my SSH connection would have collapsed but now I'm confused what Port SSH really uses

Typically, your existing connection will not be effected. We would have to see your resulting iptables rule set to know for certain, but your existing/related tcp connection should bypass the closed port check. You can verify by trying to make a new ssh session (as mentioned by the comment from @Joes).

Is the 47000+ Port only used for the handshake?

No. That port will be used for all the SSH traffic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.