Monday, November 25, 2019

linux - Restarting Network through SSH

On server A, I want to issue the following commands to Server B through ssh.




service network stop
sleep 5
service network start


The problem is because I issued a network 'stop', then my current ssh connection is lost as well. Therefore I cannot execute the succeeding commands (sleep 5 and service network start). Note that I cannot use (service network restart).



Does anyone have a workaround / solution for this?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...