Remote connection, open new tab

Hi,

I'm a long time Linux user and recently switched to a Mac at work. Everything is going well except for one thing. I'm trying to avoid retraining muscle memory and also trying to avoid potentially millions of keystrokes per year.

My problem is that I cannot find a way to open a remote connect in a new terminal tab. My workaround is to open a new tab and issue the ssh command. You see here that over time the extra keystrokes required will be HUGE, especially considering that some of the hosts that I ssh to have names like server.businessunit.location.network.domain.

So, am I missing something? Is there a way to open a remote connection in a new tab by simply clicking a couple of times similar to how it would be done in gnome-terminal? If there isn't, I'd like to request that functioanlity.

Thanks,

New Mac User Love Linux Long Time But Using Mac at Work and Maybe Home Someday

Posted on Apr 16, 2010 8:00 AM

Reply
4 replies

Apr 16, 2010 9:37 AM in response to drossmanicus

one way is to go into terminal, go to settings and startup. you should see a field where you can enter the command you want executed. by default, it will do login, but you can change it to "ssh user@ server.businessunit.location.network.domain". when you open a new tab or window, it will ask for the password of the ssh session. this would be annoying if you used terminal for things besides sshing to this server as this user.

another option would be to create a .command file and place it in your dock. it's a shell script more or less that opens a new window and executes whatever you put in it. it's a text file and you could have just one line in there that is "ssh user@ server.businessunit.location.network.domain" and save it somewhere (like desktop or somewhere out of sight) and drag it to the dock. clicking it will open terminal and give you a new window. this would allow you to keep the usual login command so if you use terminal regularly you will not be annoyed by the downsides of the first suggestion.

Apr 16, 2010 10:54 AM in response to drossmanicus

Another option is to use iTerm <http://iterm.sourceforge.net>
It allows you to maintain a bookmark list of systems where each one can have its own ssh command for making the connection.

You can also bind a hotkey to a given bookmark (cmd-ctrl-letter) and create a new tabbed session, that then ssh's into the remote system.

Some people like iTerm. Some do not. If you find it interesting, play with the fonts, play with the options, and see if it will work for you.

But if you still want to stay with Terminal, you can also do something like:

open -a Terminal ssh://username@remote.system.name

This can be run from from a terminal session, it can be run via an Applications -> Automator -> Run Shell Script workflow saved as a double clickable application. Or you could write an Applescript to run the command. Or you can get Platypus (free download) to turn any script into a double-clickable appliation.

The downside is that this appears to create a new Terminal window, and not a new tab.

Message was edited by: BobHarris

Apr 16, 2010 2:23 PM in response to drossmanicus

Thanks for the suggestions.

Being the lazy Sysadmin that I am, I came up with the solution of making a shortcut on the desktop to execute a shell script that will ssh to my linux box, execute gnome-terminal and display it on the Mac:

ssh -Y me@mylinuxbox gnome-terminal &

This'll work when I'm in the office and I'll just retrain my fingers when I'm elsewhere.

Where should I go to make a feature request?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Remote connection, open new tab

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.