Hello,
I edited my /etc/ssh/sshd_config changing Port 22 to Port 1023. Restarted service and now I can’t connect.
Do I have to open port in firewall also? If so, how can I do this?
If I change back config to port 22 it works again.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Did you install a firewall on your droplet? What’s the output of <pre>sudo iptables-save</pre>?
A default install of Ubuntu 12.04.3 x64 doesn’t enable the firewall by default. However if you enabled it, yes you will need to open the port.
<br>
<br>A simple way to open the port is with the ufw command, as root type:
<br>ufw allow 1023/tcp
<br>
<br>To check the status of the firewall you can either of the following commands (as root):
<br>ufw status
<br>iptables -nL
<br>
<br>If your unable to access your VPS instance you will need to log into the portal, select the droplet and use the Console Access option.
I have this same problem, and it seems iptables -nL returns a line with: <br>… <br>ACCEPT tcp – 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 <br>… <br> <br>Do I need to update the iptables configuration to allow the new ssh port? <br> <br>From my mac osx client, I am not getting connection refused - I am getting a simple time out message: <br> <br>ssh: connect to host a.b.c.d port nnnnn: Operation timed out <br> <br>Any ideas? <br> <br>This is an Ubuntu droplet with ghost blog app chosen as setup time.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.