<< All Posts
Amazon EC2 Ubuntu - How to run SSHD in multiple ports. 22, 8888


Hi!

Do you have a firewall in your company that blocks the port 22? Do you want to put your amazon ec2 ubuntu server running in more than one port? For instance 22 and 8888? Just follow this steps and get what you want!

sudo -s
vim /etc/ssh/sshd_config

Add after this line: Port 22 more one line. Port 8888

Port 22
 Port 8888
root@ip-172-xx-xx-x:/tmp# service ssh reload
 root@ip-172-xx-xx-x:/tmp# netstat -tan |grep LISTEN |grep -v 127.0.0.1 | sort
 tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
 tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN
 tcp6       0      0 :::22                   :::*                    LISTEN
 tcp6       0      0 :::80                   :::*                    LISTEN
 tcp6       0      0 :::8888                 :::*                    LISTEN
 root@ip-172-xx-xx-x:/tmp#

 



<< All Posts