terminal and ssh

Discussion in 'Mac Apps and Mac App Store' started by vladovs, Jun 10, 2010.

  1. vladovs macrumors newbie

    Joined:
    Jun 10, 2010
    #1
    Hi all,
    I`m new in Mac Os world. I need to start ssh from terminal in new terminal window. I don`t have xterm and realy i don`t see how can I do this. Please Help!
    Thanks
     
  2. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #2
    Open Terminal

    Code:
    ssh -l [user account] [server you're logging into]
     
  3. Queso macrumors G4

    Joined:
    Mar 4, 2006
    #3
    There's a very nice way of doing this if you drag the Terminal to your dock. Once Terminal is running, right click on the Dock icon and select New Remote Connection... SSH is amongst the options in there, you can add in servers you use a lot, and it opens in a new Terminal window.
     
  4. vladovs thread starter macrumors newbie

    Joined:
    Jun 10, 2010
    #4
    miles01110: Thanks, but when i start
    Code:
    ssh -l username@server
    give exception that i don`t use correct ssh command

    Queso: I don`t explain everything :) I write java application who make ssh connection. For this I need console command for execute ssh in new terminal window :)
     
  5. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #5
    That's because that's not the correct syntax.

    Example:

    Code:
    ssh -l vladovs www.helpme.com
     
  6. vladovs thread starter macrumors newbie

    Joined:
    Jun 10, 2010
    #6
    Sorry my mistake:D , but still open in same terminal window :confused:
     
  7. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
    #7
    You can create a new terminal window by pressing Command + N. Then you can open an ssh connection in that window.
     
  8. Detektiv-Pinky macrumors 6502a

    Detektiv-Pinky

    Joined:
    Feb 25, 2006
    Location:
    Berlin, Germany
    #8
    You can skip the -l parameter and enter the user directly with the @ sign:

    Code:
    ssh vladovs@www.helpme.com
    If you want the connection to open in a new window you could try the following:

    Code:
    osascript -e 'tell application "Terminal" to do script "ssh vladovs@www.helpme.com"'
     
  9. vladovs thread starter macrumors newbie

    Joined:
    Jun 10, 2010
    #9
    Thanks everyone final decision for my problem is:

    Code:
      apple.applescript.AppleScriptEngine engine =  new apple.applescript.AppleScriptEngine();
    
    try
    {
    engine.eval(
         "tell application \"Terminal\"\n"+
         "activate\n"+
         "do script \"ssh -4 vladovs@server"\n"+
         "end tell"
       );
    }
    catch(Exception ex){}
    
     

Share This Page