Pages

Wednesday, October 16, 2013

Creating simple executable files (Mac OS X)

If you routinely use the Terminal utility to make ssh connections, you might want to speed things up a bit. Sure, you can type the required ssh username@domain.com but why not create a file that you can simply double-click on to do the same.

To do so, launch the Terminal application and enter the following command, replacing your username and domain in the appropriate place.

   echo 'ssh username@domain.com' > Launch_ssh

The file will be created in the top level of the current user directory. Then to make the file executable, enter chmod 755 Launch_ssh. Now, switch to the Finder, select the file and choose File > Show Info. Then select Application from the Show menu and set the Terminal utility as the application the system will use to open the application. Next, double-click on the Launch_ssh icon to launch the ssh connection. You'll still have to enter your passwörd so your connection is secure.

You can also use this technique for any commands you routinely run in the application. That way, you can create any number of quick commands.



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.