Visit Our UNIX and Linux User Community


ssh passphrase issues - Mac OS X


 
Thread Tools Search this Thread
Operating Systems OS X (Apple) ssh passphrase issues - Mac OS X
# 1  
Old 07-28-2009
ssh passphrase issues - Mac OS X


ssh passphrase permissions issues
I will try to be as thorough as possible, but keep in mind I am a designer, not a programmer... I do have linux mdadm experience and am reasonably comfortable behind the terminal, but I may need things to be spelled out for me. I am using 2 new-ish Macs with 10.5.7. Thx!

Objective:
create a ssh tunnel so my Macbook Pro at my office can connect to my Mac Pro at home. I will be using JollysFastVNC to access programs and have complete access to my workstation. All I need the ssh for is to connect one laptop to one desktop with a static IP. I just need help configuring the ssh securely.

So far I have used this potentially amazing tutorial -- however I have gotten to step 3 on page 2 and have produced different results depending on how I transfer the id_rsa private key to the .ssh folder on my laptop. Basically I'm stuck here. It appears to be a permissions problem in the id_rsa file but I can't seem to affect it. Specifically I can login to the Mac Pro locally, but questionably insecurely, and I cannot login with an external ip address -- reguardless of the permissions setting on the id_rsa file. Therefore I'm convinced I've done messed up somewhere else too...




Result from id_rsa file #1:
When I copy the id_rsa file to the macbook via thumb drive (like the tut says) I get these results:
• id_rsa file shows up in finder as a UNIX executable file with open permissions... r/rw for user (Me), staff, everyone
• when I type ssh username@local-ip-address into the terminal I get an "@@@ WARNING: UNPROTECTED PRIVATE KEY @@@" message. (please view image (that's now a link))
• Then I type my password to the MP and it logs in. (Doesn't ask for the passphrase) This really confuses me.






Result from id_rsa file #2:
When I copy the id_rsa file to the macbook via local network (directly to the mackbook's user's shared public folder) I get these results:
• id_rsa file shows up in finder as a plain text file with r/rw access to nobody and no access to everyone.
• when I type ssh username@local-ip-address into the terminal:
_ • first the terminal outputs the warning.txt from the the MP, then I get "password" prompt
_ • If type my passphrase or if I type anything into the password prompt, the same prompt pops up again as if the passphrase is typed incorrectly. then after 3 attempts it goes to the terminal and asks for the password for the MP. Strangely, when I hit cancel or type in nothing and click "ok", the password prompt doesn't reappear and it again goes straight back to the terminal and asks for the password to the Mac Pro.
_ • When I type in my password to the MP in the Terminal, I am logged in to the MP just like the other id_rsa file.





Likewise when I type ssh -p 8822 username@external-ip-address I get the same results for each of the id_rsa versions ("@@@ WARNING: UNPROTECTED PRIVATE KEY @@@" message or that password prompt that doesn't seem to do anything)
except this time I am not asked for the MP password in the terminal, instead I just get a "Permission denied (publickey)" error. Luckily it appears I'm not accessing the MP at all since the ***Warning*** message dosen't appear.



Any help would be appreciated! Thx!



---------- Post updated at 02:31 PM ---------- Previous update was at 10:45 AM ----------

SSH in Mac OS X

Says:
"Be sure to save it as a file. DO NOT copy and paste the keys! Copy/paste will add newlines, which will make the keys unusable."

So perhaps my problem is that I need to somehow get the key to the client computer without copy/paste.

Quite a conundrum for someone favorite shortcuts are cmd-C cmd-V...

---------- Post updated at 03:14 PM ---------- Previous update was at 02:31 PM ----------

Setup the SSH server to use keys for authentication
HTML Code:
scp ~/.ssh/id_dsa.pub User@localIpAddress:~/.ssh/authorized_keys
Copying via terminal fixed my permissions issue. Still working on the remote login however. Still get "Permission denied (publickey)" after a successful passphrase login.

Last edited by Ahab the Eskimo; 07-28-2009 at 04:22 PM.. Reason: trying to figure out why my images changed to links...
# 2  
Old 07-30-2009

Previous Thread | Next Thread
Test Your Knowledge in Computers #291
Difficulty: Easy
In August 2016, the United States government announced a new federal source-code policy. This policy mandates that at least 50% of custom source code developed by or for any agency of the federal government must be released as open-source software (OSS).
True or False?

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Supply passphrase for ssh in script

I would like to write a bash shell script which will connect to remote server using passphrase. (I have public-private infrastructure created, and as per instruction, I must not use password less ssh). This particular script will be fired from cron. Can you please advice how I can supply the... (2 Replies)
Discussion started by: atanubanerji
2 Replies

2. Solaris

How to disable/bypass passphrase prompt in ssh?

Hi Folks, I have setup a passwordless connection from my Linux ( source) machine toSolaris ( destination ) machine. I have added passphrase while creating the rsa key. Now problem is each time when i make a connection i have to give the passphrase to make connection. How to override this ? I... (4 Replies)
Discussion started by: chidori
4 Replies

3. UNIX for Advanced & Expert Users

ssh: require passphrase from some servers but not others

We have a number of linux clusters running Oracle. The clusters require that all member nodes have promptless/passwordless login through ssh (ie. the keys were created with null passphrases). We also have a management server that is not a member of any cluster but routinely connects to nodes of all... (3 Replies)
Discussion started by: Squeakygoose
3 Replies

4. Shell Programming and Scripting

automated ssh with provision for passphrase

Below is a part of my shell script. Currently I have shared the public key of the client with the host, therefore I will not be prompted for the password. The key that has been created on the client is also without a passphrase. If it is created with a passphrase, the code I have will not... (3 Replies)
Discussion started by: farahzaiba
3 Replies

5. Solaris

SSH passphrase and Password

Hello all, Today we run ssh with keys on all our Solaris systems. But I wounder: Is it possible to add another authentication too. Like the os/system regular password so the users first need to enter the ssh phasssphrase and after that they need to enter the os/system password. I need like... (3 Replies)
Discussion started by: jOOc
3 Replies

6. UNIX for Advanced & Expert Users

passphrase and ssh authentication

In which case could be better don't use a passphrase creating an authentication key for ssh comunications? Thanks in advance. (1 Reply)
Discussion started by: Minguccio75
1 Replies

7. UNIX for Advanced & Expert Users

ssh - at login Passphrase for key required

Hello, I want to use a shell-script to transfer data over sftp. I don´t find a way to login in automatically. I tried to send the password in a script like possible with ftp sftp user@server << cmd password cd /distant/directory lcd /local/directoryget ssh_install get ( or put) your... (2 Replies)
Discussion started by: olso
2 Replies

Featured Tech Videos