Linux virtual machine SSH service, open and close the firewall

1. Check the SSH service

serveice sshd status 

--> Checking for service sshd running

 

2. Turn on the SSH service

service sshd start

--> starting SSH daemon

 

3. Temporarily turn off the firewall (environment after the restart, the firewall will close)

rcSuSEfirewall2 stop

 

4. permanently turn off the firewall

chkconfig SuSEfirewall2_init off

chkconfig SuSEfirewall2_setup off

 

Sub-operating system

Under SUSE11:
close operation is:
Service SuSEfirewall2_setup STOP
Service SuSEfirewall2_init STOP
to cancel firewall boot:
chkconfig SuSEfirewall2_init OFF
chkconfig SuSEfirewall2_setup OFF


Start-up operation is:
Service SuSEfirewall2_setup Start
Service SuSEfirewall2_init Start
cancel the firewall boot:
chkconfig SuSEfirewall2_init ON
chkconfig SuSEfirewall2_setup ON


Under suse12 operation is:
turn off the firewall
systemctl stop SuSEfirewall2.service
cancel startup firewall
systemctl disable SuSEfirewall2.service

Open the firewall
systemctl enable SuSEfirewall2.service
boot firewall
systemctl start SuSEfirewall2.service

Guess you like

Origin www.cnblogs.com/ricebug2/p/11616089.html