HT2488: Mac Basics: Automator
Learn about Mac Basics: Automator
-
All replies
-
Helpful answers
-
Feb 29, 2012 10:23 AM in response to New to Automatorby BobHarris,Why not create a shell script to just execute the ssh you want?
#!/usr/bin/env bash
ssh -p 12345 username@remote.host.domain.name
save as a file with a name you like and make the file executable
chmod +x name.of.the.script.you.created
You could have different shell scripts for different systems you are trying connect to.
Now I like to use iTerm.sf.net which allows me to maintain a set of bookmarks with stored ssh commands so I can start an iTerm terminal tab that automatically issues the needed ssh command that connects to the remote system. iTerm even lets you assign hot keys to books marks (Command-Control-a, cmd-ctl-b, cmd-ctl-c, etc...)
-
Feb 29, 2012 10:35 AM in response to BobHarrisby New to Automator,Thank you Bob!!
but if you could explaing to me how to create a shell script.
-
Feb 29, 2012 10:47 AM in response to New to Automatorby BobHarris,nano name.of.the.script
... enter your script starting with #/usr/bin/env bash on the very first line...
Control-O Control-X to save and exit nano
chmod +x name.of.the.script
./name.of.the.script # to invoke the script
Suggest against using TextEdit (creates more problems then it is worth to untangle). If you must use a GUI text editor, then download the free TextWrangler (google will find it).
I just remembered another trick you can use. If you name the file something.command (the important thing being .command as the end of the file name), and you have made it executable using the
chmod +x something.command
then you can double click on the file, and it will launch Terminal, then exeucte the commands in the something.command file. Of course the 'something' can be anything you want as long as it ends in .command
You might like this better.
Message was edited by: BobHarris
-
Feb 29, 2012 10:53 AM in response to BobHarrisby twtwtw,Hey, it's the 21st century already! unless you grew up with nano and are used to command line text editing, download TextWrangler and use that. it's a much more user-friendly environment for people who are accustomed to point-and-click text editing apps. You could even use TextEdit, so long as you make sure you're editing in plain text (not rich text) mode.
nano - unix geektility...
-
Feb 29, 2012 11:42 AM in response to twtwtwby BobHarris,TextEdit has recently been guilty of applying a quarantine xattr, so I would stay away from TextEdit.
-
by Linc Davis,Feb 29, 2012 12:02 PM in response to New to Automator
Linc Davis
Feb 29, 2012 12:02 PM
in response to New to Automator
Level 10 (208,037 points)
Applications -
Feb 29, 2012 12:39 PM in response to Linc Davisby BobHarris,Or even search over at MacUpdate.com for ssh helpers
-
Feb 29, 2012 12:52 PM in response to New to Automatorby Cole Tierney,I would recomend using a ~/.ssh/config file. I'm sure it would be helpful with all the suggestions here. Create ~/.ssh/config with somthing like the following:
Host alice Hostname some.domain.name User yourusername Host bill Hostname remote.host.domain.name User username Port 12345
Then to log in:
ssh alice
or
ssh bill
To see all the rest of the options that can be set for each host entry:
man ssh_config