Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7720487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:41:13+00:00 2026-06-01T03:41:13+00:00

I’ve used some neat example’s from attached URL’s. What I’ve got so far is

  • 0

I’ve used some neat example’s from attached URL’s. What I’ve got so far is the script opening several tab’s with ssh session’s. But as I’ve several client’s to whom’s server’s I connect I don’t want a script with a hard coded list for every client. I want a dialod box asking to which list I’ld like to connect…

But now that I tried to add a dialog I’m stuck:

--set wseServer to {"xen", "bcs", "db", "lx", "mgr", "nx", "proxy", "smb", "wiki", "zarafa"} as list
set wseServer to paragraphs of (do shell script "/bin/cat $HOME/.ssh/hostlist-wse-deb.pssh")
--set edlServer to {"edl", "edev", "edb", "emon"}
set edlServer to paragraphs of (do shell script "/bin/cat $HOME/.ssh/hostlist-edl.pssh")
set allServer to wseServer & edlServer

set serverList to button returned of (display dialog "Dude, choose your prefered connection List" buttons {"wseServer", "edlServer", "allServer"} with title "SSH Server" default button 3 with icon caution giving up after 5)

tell application "iTerm"
activate
set myTerm to (make new terminal)
tell myTerm
    repeat with hostItem in serverList
        set Lsession to (make new session)
        tell Lsession
            --set secureshell to hostItem exec command "ssh " & hostItem
            exec command "ssh " & hostItem
            --sleep to prevent errors if we spawn too fast
            do shell script "/bin/sleep 0.01"
        end tell
    end repeat
end tell
end tell

After choosing one of the items from the dialog iterm opens 8 Tabs, doesnt execute ssh and closes them… No error no nothing!

This is the example I’m trying to expand:
http://code.google.com/p/iterm2/wiki/AppleScript

I know I’m nearly there but can’t see the solution!

Hope one of you has a hint…

Thx in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:41:15+00:00Added an answer on June 1, 2026 at 3:41 am

    Answer to myself so it hopefully will help other’s too:

    removed all the stuff above the “tell application …” and added this:

    set sshList to {"WSE", "EDL", "Alle"}
    set sshServer to choose from list sshList with title "SSH Server"
    if sshServer = {"WSE"} then set serverList to paragraphs of (do shell script "/bin/cat $HOME/.ssh/hostlist-wse-deb.pssh")
    if sshServer = {"EDL"} then set serverList to paragraphs of (do shell script "/bin/cat $HOME/.ssh/hostlist-edl.pssh")
    if sshServer = {"Alle"} then set serverList to paragraphs of (do shell script "/bin/cat $HOME/.ssh/hostlist-wse-deb.pssh & /bin/cat $HOME/.ssh/hostlist-edl.pssh")
    

    The dialog is not as beatyful as with the first attempt but it work’s…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
i got an object with contents of html markup in it, for example: string
I used javascript for loading a picture on my website depending on which small
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.