T
T
Timur Yakhin2014-08-05 07:49:18
SSH
Timur Yakhin, 2014-08-05 07:49:18

How to connect to a server via SSH from Mac OS X?

Greetings.
I apologize in advance for the stupid question.
How to connect via SSH to a server with key authorization from Mac OS 10.9.4?
From what I managed to dig up:
1. copied the private key to .ssh/private.ppk and set the rights to 600
2. I run ssh [email protected] -p 10522 -i .ssh/private.ppk
3. this brings up a window with input password for the key (it is without a password), I click OK and Saving password to keychain failed, the server tries to log in using a password (there is no password either, access is only by keys)
What am I doing wrong?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Petrikov, 2014-08-05
@temoffey

Just like from any nix, we place our private key in the user's home directory/.ssh and use any terminal emulator. Only the key must be generated in nix, and not with crooked windows utilities, otherwise convert.

M
Maxim Kovalev, 2014-08-05
@kai_zer_ru

ssh [email protected] -p 10522 -i ~/.ssh/private.ppk
You forgot ~/ in the path to the key
Another option is to edit the file ~/.ssh/config
nano ~/.ssh/config
And write the following in it lines:
Host MyServer
Hostname server.com
Port 10522
User login
IdentityFile /Users/UserName/.ssh/private.ppk
And then relogin in the console.
And in general, you can use special utilities for access via SSH - for example, vSSH. I use and am satisfied.

K
kompi, 2014-08-05
@kompi

Set a ban on connection by password (key for cli or directive for config) for this host.
Write an absolute path for the private key, not a relative one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question