Is there a way, or extension, to save SSH bookmarks in OSX's Terminal? (or a way to use iTerm like TotalTerminal's quick visor
There are a few different ways to create ssh command bookmarks.
Settings Profiles with Custom Commands
You can create new settings profiles, each with a different ssh command. Profiles serve as both appearance "themes" and as "bookmarks" for commands and remote connections.
Then either create a new profile or duplicate an existing one (there's a Duplicate command in the action menu at the bottom of the profiles list) and then customize the command:
Enter the desired ssh command there.
Profiles appear in the Shell > New Window and New Tab submenus. Choose one to create a new terminal and run the associated command.
Running Multiple Commands at a Time with Window Groups
If you want to automatically create several terminals at a time (which will also run their profile commands), you can create a set of terminal windows/tabs using each profile, then save them as a window group with:
When you open the window group it will restore all the windows/tabs and run the commands associated with each profile. You can even tell Terminal to open a particular window group each time Terminal starts in:
Improvements in Mac OS X Lion 10.7
In Mac OS X Lion 10.7 this gets simpler: you can tell Terminal to remember the commands for individual windows without creating a custom profile for each one.
If you use the Shell > New Command or New Remote Connection commands to create terminals, the command is recorded with the window/tab. If you save them in a window group, it will automatically restore (re-run) "safe" commands, and there's a checkbox to tell it to restore all commands. "Safe" commands include anything run from the New Remote Connection dialog, any shell listed in /etc/shells, plus emacs, vi/vim, pico, nano, screen, tmux and top.
You can save shell commands (or, indeed, entire shell scripts) in a file with the filename extension ".command", and if you open one of these files Terminal will open a new terminal window and tell the shell to execute the commands in the file.
Some people use these as ssh bookmarks. To make it convenient to run them, you can put them in the Dock, or a collection of them in a folder in the Dock.
After creating a ".command" file, make it executable with
I've been looking for a way to bookmark SSH commands and eventually I developed a Mac app for our team, called TaskTips (https://task.tips/). Basically it can save you time by indexing your SSH commands, and autocomplete when you search SSH tasks, executing tasks automatically.
If it is also helpful for someone else, I would be really happy about it.
Simply open the terminal app and then type Command + Shift + K from within the app. This will open a window that let's you save connections. (At least in OSX 10.9 Mavericks)
I'm not sure what SSH bookmarks are, but you might find the SSH config file useful. I'd advocate it over the alias approach.
You can store host specific settings (and aliases) in:
Instead of doing:
You could type:
If you added the following to your SSH config:
You could also setup passwordless SSH and add the location of your identify file here. A bit more secure than storing passwords, and quicker than typing it out.
For more info about SSH config do:
Note: This option will work in all terminal emulators, and all shells (e.g. zsh instead of bash), and even other apps that use SSH (e.g. rsync, scp, git).
I'm not sure how SSH bookmarks work in iTerm but you can create an alias in your shell to accomplish the same thing:
To set an alias in the Terminal use the following syntax:
Now just run
To make the alias permanent you have to add the alias to your login script and reload your login script for the changes to take effect. If your using the default shell, bash:
More about aliases: http://ss64.com/bash/alias.html