< See all updates

Act faster with SSH Command Macros

Published on Mon Mar 11

Introducing SSH Command Macros: Register common commands for quick, one-click execution, enhancing efficiency and safety with confirmation for risky tasks

We are doubling down on SSH because you praised it and we can't thank you enough for this.

Now you can register common commands that you run usually. This way, you can execute them faster when you have to, with a simple click.

How does it work in details ?

From the side menu, access the SSH Command Macros section.

Open the drawer menuOpen the drawer menu
Add an SSH Command MacroAdd an SSH Command Macro

Here are some examples :

  • free -m
    Display the amount of free and used memory in the system (doc)
  • ps
    Report a snapshot of the current processes (doc)
  • sudo systemctl restart nginx
    Restart the nginx web server (or more generally, any service managed by systemd) (doc)

These are only suggestions, of course the possibilities are endless and it really depends on your use cases. For example, if you're running a Ruby on Rails application, you might want to register the command restarting puma.

Flag an SSH Command Macro as dangerousFlag an SSH Command Macro as dangerous

Some commands are more "dangerous" than others. For instance, getting a snapshot of the memory is read-only and therefore pretty safe. On the other hand, restarting a production web server can cause a downtime in some cases, for some architectures. When you flag it as "dangerous", the command is displayed in red and when you use it, you are asked to confirm it. This way, you avoid mistakes as much as possible.

Once you have defined your SSH Command Macros, you can go to you instances list and connect to SSH.

SSH into the instanceSSH into the instance
Macros displayed for quick accessMacros displayed for quick access

With a simple click, you can execute them !

Prompt for confirmation when dangerousPrompt for confirmation when dangerous

As usual, if you have any question, we will be happy to help. You can reach out to us anytime, via the Give Feedback button present at the top of your Control Panel.

Chafik H'nini

Want to give it a try ? Get the app for free on the stores.

Download on the App Store
Download on the Play Store