SSH with Terminal

Joined
May 29, 2011
Messages
4
Reaction score
1
Points
3
I am new to iMac (just bought 27 inch a couple days ago to replace my dead Dell). I used to use "Putty" to SSH into my remote Unix server, when I was then asked to enter my name (root) and password, when then would take me to the command line on my remote server. It seems that I should be able to SSH using terminal in the Mac, but I'm getting frustrated getting it to work. From examples I've seen, it says enter ssh [email protected]. When I try that I just get a blank screen.

In putty, I simply entered the IP address and port for my server and it would take me to my server log in, which is where I could log in as root user. Can someone please tell be how I do equivalent in Terminal (or can i?) I want to just get to my remote server login where I can then enter my user name/password to log in.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
The command is indeed ssh user@host

If you're not getting a password prompt, chances are you're not connecting. If your firewall is turned on, try turning it off and connecting. If this works, it's a firewall setting.

edit: Once you get the connection working.. I add aliases to make it much easier.. only takes a couple seconds to add one.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
If you are not using the standard port of 22 for SSH to your server you'd want to use
Code:
ssh root@host:<port>
 
OP
B
Joined
May 29, 2011
Messages
4
Reaction score
1
Points
3
Thanks for the replies! I have actually figure it out. The reason I wasn't connecting is that I have my remote server configured to use a non-standard port for a little added security, so I had to tell ssh command what port to connect to, like this:

SSH -oPort=XXXX [email protected]

Then I was prompted for my root password, which I entered, and viola! I was in!
 
Joined
Jul 2, 2007
Messages
3,494
Reaction score
204
Points
63
Location
Going Galt...
Your Mac's Specs
MacBookAir5,2:10.13.6-iMac18,3:10.13.6-iPhone9,3:11.4.1
i think i used too use
ssh -p ### root@ip

I could never figure out how to use the public key authentication though on terminal. Like how on Putty you can import a key that you have downloaded from WHM/cPanel.

I dont know how to do that in terminal.

You can just vi your $HOME/.ssh/authorized_keys file and add the key yourself.
 
Joined
Jan 4, 2006
Messages
1,385
Reaction score
146
Points
63
Location
Hamburg, Germany
Your Mac's Specs
MacBook Pro | iMac(2.1 G5) | MacBook(2.16 C2D) | MacMini (1.67 CD) | iPhone 4 | iPad (3rd Gen)
i think i used too use
ssh -p ### root@ip

I could never figure out how to use the public key authication though on terminal. Like how on Putty you can import a key that you have downloaded from WHM/cPanel.

I dont know how to do that in terminal.

You can read a bit about authentication through public key in here.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top