SSH: Undo Your Network Screwups After You've Lost the Connection - ihack.gr

Νέα

test banner

Post Top Ad

Responsive Ads Here
SSH: Undo Your Network Screwups After You've Lost the Connection

SSH: Undo Your Network Screwups After You've Lost the Connection

Share This
Messing with a firewall or a network over a remote connection? Nerve wracking isn't it? Change the wrong setting and you'll be locked out, unable to fix it.

So why not undo your mistake? Schedule a job to run at a later time that undoes what you're about to do.

at now + 5 minutes <<< 'cp /etc/ssh/sshd_config.old /etc/ssh/sshd_config; service sshd restart'

If you screw up, the job will run and restore things to the way they were. If you your change works, then just run

atq

to check the queue of upcoming at jobs, and

atrm jobNumber


to remove it.

Post Bottom Ad

Responsive Ads Here

ΣΕΛΙΔΕΣ