Menu
blog.headdesk.me
blog.headdesk.me

Cool feature on Azure – Run Command Script

Posted on 2018/11/012018/11/01

I don’t think I’ve ever said anything good about Azure, but I’ve finally ran into one today. Someone screwed up sshd_config and the service would not start anymore. With the run script tool, I was able to revert the config to the original version and restart the service. Fortunately, the changes were checked into RCS, which made recovery relatively easy.

Here, I checked out the original version of the config file, overwrite the existing file quietly. Then restart sshd

co -q -f1.1 /etc/ssh/sshd_config
systemctl daemon-reload
systemctl restart sshd

In other cloud environments, I’d have to mount the OS disk on another machine and edit the file. Or do it through console, which only a few providers offer “writable” console.

Loading

Full text search

Recent Posts

  • Generate secure password
  • AWS Compute Savings Plans
  • AWS Zonal Shift
  • Coffee break…
  • Prevent private key from being committed to git
  • aws (14)
  • coffee (2)
  • headfi (1)
  • linux (9)
  • others (61)
  • security (2)
  • tech (41)
  • terraform (3)
  • wordpress (2)

Loading

apache aws awscli azure backup boot cloud coffee docker ec2 EL8 ElasticBeanstalk espresso featured git kernel lelit linux lvm meltdown MFA nat gateway php power proliant python rdp Redhat RHEL rpm Ryzen scp security smartarray smart switch snapshot spectre tech terraform ubuntu ubuntu upgrade vpn windows wordpress workspace

©2026 blog.headdesk.me | Powered by SuperbThemes