Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

vladovs

macrumors newbie
Original poster
Jun 10, 2010
4
0
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
 
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.
 
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 :)
 
That's because that's not the correct syntax.

Example:

Code:
ssh -l vladovs www.helpme.com

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"'
 
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){}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.