Jump to content

How to change port that SSH listens on


fuzzylizard
 Share

Recommended Posts

Well, the subject line basically says it all. I have set up Dynamic DNS for my home Linux box and have pocked a whole through my firewall for ssh, but I still can not connect from the outside.

 

I can connect to my linux box through ssh from inside my network, so I know the protocol is running on the machine. I have tried to connect using both my IP address and the dynamic dns domain name, neither works.

 

This leads me to only one conclusion, that my ISP is actively blocking port 22. Therefore, the only recourse that I have is to set SSH to listen on a non standard port. However, I have no idea as to how to do this.

 

Any suggestions?

Link to comment
Share on other sites

I would be very surprised if your ISP was blocking port 22, Sometimes they block 21 (ftp) have you asked them?

Have you run, netstat to see if 22 its really open?

When you try to conect from outside does it say "connection refused" or something else?

You can put ssh on another port, but i suspect the problem is not your ISP.

Link to comment
Share on other sites

Just ran a check on you, Your port 22 is open :

The authenticity of host '64.231xxxxxx (64.231xxxxx)' can't be established.

RSA key fingerprint is 28:5a:42:c2:f4:bd:ff:7d:fd:a8:03:e9:d6:f7:b2:06.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '64.231xxxxxxx' (RSA) to the list of known hosts.

root@64.231.xxxxs password:

Link to comment
Share on other sites

maybe try ssh -l *USERNAME* 1.1.1.1 ( ip )

 

example mine is ssh -l jason 1.1.1.1

 

And it all work's..

Link to comment
Share on other sites

Yep, you are all correct. Port 22 - SSH - is definitely not blocked. It was a problem with the computer that I was trying to test from. For some reason it was not playing nice.

 

Anyway, I can connect to my computer through ssh so all is well.

 

However, just for curiosity sake, the question still stands. How do you tell ssh to listen on a different port?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...