MacOS – terminal app that can record commands

applicationsmacosterminal

Coming from windows using Mobaxterm I really miss the ability to record a "macro" for certain commands and able to to play back on the terminal. Whats more Mobaexterm was also able to save ssh session so that all the login info like address are saved? My question is there something similar for Macs? thank you.

Best Answer

Terminal.app (the default macOS terminal application) can be scripted using AppleScript but a better option may be iTerm2, which can be scripted using Python (AppleScript is also supported but it's deprecated).

If you'd like to save ssh sessions your most portable option is to use the OpenSSH client configuration file (typically named ~/.ssh/config). Using it you can configure per connection settings like key, username, etc.