DevOps Linux Tutorials Others

Enable SSH on multiple ports CENTOS 7 / RHEL 7

ssh_image

enable ssh with multiple ports.

update yum and install vim

guesslinux_ssh_multiple_login1

yes | yum update -y && yum install -y vim

guesslinux_ssh_multiple_login2

guesslinux_ssh_multiple_login3

edit your ssh config file

vim /etc/ssh/sshd_config

add your ssh ports

guesslinux_ssh_multiple_login4

restart sshd

systemctl restart sshd

guesslinux_ssh_multiple_login5

if your firewall enable follow below otherwise skip this.

firewall-cmd --add-port=7059/tcp --zone=public --permanent
firewall-cmd --add-port=7056/tcp --zone=public --permanent
firewall-cmd --add-port=8080/tcp --zone=public --permanent

firewall-cmd --reload

guesslinux_ssh_multiple_login6

guesslinux_ssh_multiple_login6 guesslinux_ssh_multiple_login7

Testing

ssh -p 7059 root@139.59.36.101
ssh -p 7056 root@139.59.36.101
ssh -p 8080 root@139.59.36.101

guesslinux_ssh_multiple_login7 guesslinux_ssh_multiple_login8 guesslinux_ssh_multiple_login9

Thank you

 

Leave a Comment