Create SSH Bookmarks in Terminal for Quick Remote Server Access in Mac OS X

Jun 3, 2012 - 5 Comments

SSH Bookmarks in Terminal

Setting up SSH bookmarks within Terminal app is an easy way to quickly connect to remote machines. If you haven’t noticed these in Terminal before it’s probably because they aren’t labeled as bookmarks, and therefore the feature gets frequently overlooked by even the most advanced Mac users. Here’s how to create bookmarks within Terminal, and also two quick ways to access any of those bookmarks from just about anywhere in Mac OS X.

Setting SSH Bookmarks in Terminal

This guide is intended for SSH but it would also work for Telnet:

  1. Launch Terminal (/Applications/Utilities/ folder)
  2. Pull down the “Shell” menu and choose “New Remote Connection”
  3. Choose SSH on the left side, then click the [+] plus icon to add a new server bookmark
  4. Enter the IP of the server – Important note: if you use a custom port and username enter those in the URL field as the following syntax: “-p port user@host.com”
  5. For example, if I use port 24 and the username “dude” for server3.osxdaily.com, the syntax would be: “-p 24 dude@server3.osxdaily.com”
    Create an SSH bookmark in Terminal for Mac OS X

  6. Click “OK” and you’ll find the standard command line syntax for connecting to an SSH server is printed in the connection window
  7. Click “Connect” and away you go, using the custom port and username you specified

You’ll notice we ignored the “User” field in this example because we set a custom port. If the server you are connecting to uses the default port 22 (like the OS X SSH server does) you won’t need to do this.

2 Ways to Quickly Access Terminal Bookmarks

Now that a bookmark has been created, quickly access the bookmarks from just about anywhere using these two methods:

  • From Terminal, hit Command+Shift+K to open the New Connection window
  • From anywhere in Mac OS X, right-click on the Terminal Dock icon and choose “New Remote Connection”

Access Terminal bookmarks from the OS X Dock

Both of these will bring up the connection window where the bookmarks reside. Connecting to a bookmark will request a password unless you have SSH keys set up for passwordless logins.

If you live and breathe in the command line you’ll likely find that making SSH shortcuts with aliases is a faster method to access any frequently used server, however.

.

Related articles:

Posted by: William Pearson in Command Line, Mac OS, Tips & Tricks

5 Comments

» Comments RSS Feed

  1. Darryl Baker says:

    I would like to start terminal at login and have it not start a terminal shell session but rather the “New Remote Connection” menu. Is this possible?

  2. Jake Wang says:

    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.

  3. Benjamin says:

    If you want you can backup ssh settings into the .ssh/config file and this will also allow you to create “shortcuts” for ssh connexion.
    Example: put the following lines in .ssh/config

    Host osxd
    Hostname server3.osxdaily.com
    Port 24
    User dude

    and by typing “ssh osxd” in the terminal you will now be able to connect to your server.

  4. Michael Bates says:

    Great tip for accessing linux servers. Question, how do you backup these settings?

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site