Create a file called ssh_server_name.scpt in a desired folder with the contents:
do shell script "open -a Terminal /bin/bash ~/Documents/server.sh"
To create an icon that you can click to run an AppleScript file. Here are the steps to do it:
- Save the AppleScript file with a
.scpt
extension to your desired location. - Right-click on an empty area of your Desktop and select "New" > "Script".
- A new file with a
.scpt
extension will be created on your Desktop. - Open the newly created file in the AppleScript Editor.
- Copy and paste the contents of your original AppleScript file into this new file.
- Save the new file.
- Right-click on the newly created file and select "Get Info".
- In the Info window, click on the icon in the top left corner.
- Press "Cmd + V" to paste the copied icon, or select a new icon from your computer.
- Close the Info window.
- Your new script file should now have the custom icon you selected.
Now you can double-click the icon on your Desktop to run the script.