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

Gareth-HFX

macrumors newbie
Original poster
Aug 3, 2008
5
0
Hello,

Long time reader, first time posted. I switched to Mac last Monday after 8 years on Windows. Here's what I went for;

-----
IMAC 24inch
2.8GHZ INTEL CORE 2 DUO
4GB 800MHZ DDR2 SDRAM - 2x2GB
ATI RADEON HD 2600 PRO W/256MB
320GB SERIAL ATA DRIVE
-----

Anyway, I have to connect to another server for some internet-related work, but when I try and use Terminal it always tries to connect to port 22. For security reasons, I have changed my SSH port to something else, so I'm basically wondering if there's a way to change the port that Terminal connects to when connecting to SSH...?

Thank you in advance,
Gareth
 
Another way is to edit the file .ssh/config (under your home directory) and add lines like this:
Code:
Host remoteservername
User remoteusername
Port portnumber

You can add multiple sections like that for any remote host you connect to - the lines directly underneath any Host line only apply to that host. You can type man ssh_config in the Terminal for more info.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.