# How to use OSX terminal SSH?



## smileymike (Apr 27, 2009)

Hello,

i am newbie and a migrant to OSX from windows.  Previously i used putty.exe.  It is straight forward process, all i have to do is type 192.168.72.137 port 22 on putty.exe to freebsd ssh server.

How can i do it with OSX terminal?  I have used angry IP scanner on osx and that ip isnt there (possible osx firewall).

Also all my other computers failed to get ping response from osx.

Thank you


----------



## ElDiabloConCaca (Apr 27, 2009)

First of all, read this:

http://macosx.com/forums/howto-faqs/269015-forum-tutorials-guides-only-not-questions.html

To ssh, simply open the terminal application, then type "ssh [servername]", without quotes, where [servername] is the name of your server.

If you're looking to ssh _to_ your Mac OS X box, then you need to enable "Remote Login" in the "Sharing" pane of the System Preferences.


----------



## nixgeek (Apr 27, 2009)

You can also check out the manual for the SSH command by typing "man ssh" in the command prompt.  That will show you other things that you can do with SSH in Terminal, such as creating an SSH tunnel when connecting to an SSH server to encrypt your sessions, kind of like a "poor man's proxy."  Or even to do X11 forwarding so that you can execute X11 applications remotely from your SSH server to your Macintosh.  Or even generate encryption keys in order to have an extremely secure SSH session without even needing a password.

Have fun with SSH!


----------



## Giaguara (Apr 28, 2009)

Moved.
_Man is your best friend_.  man ssh. apropos ssh...


----------



## smileymike (Apr 29, 2009)

Thank you guys for reply.

But you lost me

i used man ssh, and i have trouble in understanding everything its says.

i like to learn new things by examples.

Please keep things simple.

i tried "ssh 192.168.72.137" which worked in windows XP ->putty.exe but not on osx terminal.

192.168.72.137 is an address of vmware freebsd 7.1, according to it, the domain name is "freebsd71.domainlocal"(i think it is in hosts file which readable by freebsd OS only)

is correct command line: "ssh root@192.168.72.137"?
or should be "ssh root@freebsd71.domainlocal"?

ssh server, sshd is switched on, running, and tested with putty.exe

But there is another thing i think it causing problem.. osx firewall.  i have been ping from my windows to this mac osx and no response. "ping 192.168.0.52" which 192.168.0.52 is an address of osx.

i have "sudo ipfw list" and it shows:
33300 deny icmp from any to me in icmptypes 8
65535 allow ip from any to any

Is those first column is port numbers?

Thank you

Mike


----------



## smileymike (Apr 29, 2009)

ssh [192.168.73.137]?

I ve type that, and nothing happened.

M


----------



## ElDiabloConCaca (Apr 29, 2009)

No, you would type:

```
ssh 192.168.73.137
```



> ...type "ssh [servername]", without quotes, where *[servername]* is the name of your server...


...note I said replace "[servername]" with the server name, not "servername" with the server name.


----------

