Ssh-keygen (Saving the key failed:)


 
Thread Tools Search this Thread
Operating Systems AIX Ssh-keygen (Saving the key failed:)
# 1  
Old 10-29-2015
Ssh-keygen (Saving the key failed:)

Hi guys,

Anyone encountered the following error.

1.) all keys and passphrases worked on aix 7.1.2
2.) upgraded to aix 7.1.3sp5
3.) none of the keys / passphrases work anymore.
4.) when generating new keys without passphrase everything is ok.
5.) when generating keys with passphrase and ssh-keygen fails.
6.) did check all file and directory permissions.
7.) same error with rsa,dsa and ecdsa keys


HTML Code:
Generating public/private dsa key pair.
Enter file in which to save the key (//.ssh/id_dsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Saving the key failed: //.ssh/id_dsa.
Any ideas?
Regards
# 2  
Old 10-29-2015
Usually you'd get a line like:
Code:
Enter file in which to save the key (/home/mute/.ssh/id_rsa):

So it looks to me like your $HOME is unset and you can't save to //.ssh
# 3  
Old 10-29-2015
I have tried to save it to /tmp as a example. Same issue.
# 4  
Old 10-29-2015
I think it's because he did it under root user.

Did you try to run ssh -vvvv? It can also help to stop ssh on the server side: stopsrc -s sshd and to run it manually in debug mode: /usr/sbin/sshd -D -ddd to see what happens.
# 5  
Old 10-29-2015
We assume it is root, because //.ssh/* is the same as /.ssh/*

Just to be sure:

the output of the commands:

id
ls -ld /.ssh //.ssh

print HOME: ${HOME}

and, ls -ls ${HOME}/.ssh/id_dsa

FYI: the dsa keys seem to be "the less desired" PKI keys these days. You also want to be sure you have an "rsa" key - of sufficient bits.

and the output of ssh-V will reveal how new/old your installed ssh/ssl software is.
# 6  
Old 10-30-2015
Thanks guys, seems to be a bug in openssl on aix 7.1.3sp5.
# 7  
Old 10-30-2015
where is the output of lslpp -L 'openssl.*' and emgr -l?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Ssh-keygen problems

For some reason, when I try copying my public key to the server, despite it showing as being successful: rob@linux044:~$ ssh-copy-id -i /home/rob/Work/Keys/keys.txt.pub !@#$%.com /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/rob/Work/Keys/keys.txt.pub"... (7 Replies)
Discussion started by: Circuits
7 Replies

2. Shell Programming and Scripting

automatic SFTP without doing passwordless key with ssh-keygen

I need to automate a file transfer thru SFTP. But I cannot do a passwordless key with ssh-keygen between the servers. Is there any other way like we do something like below in FTP??? ftp -n hostIP << EOF user userid password get filename EOF Please use code tags! (5 Replies)
Discussion started by: Vidhyaprakash
5 Replies

3. Shell Programming and Scripting

sftp ssh-keygen

sftp username@host <<EOF lcd /home/dirA cd /home/dirB mput *.txt exit EOF Hi, i have done the keygen-ssh settings but rite now I log through putty I enter my credentials and then when i successfully log in, then I issue the command ssh server name then I again enter into the server but... (1 Reply)
Discussion started by: rahulsxn660
1 Replies

4. UNIX for Dummies Questions & Answers

ssh-keygen error

Hi, I using ssh-keygen for passwordless authenciation firstly and I am following these steps mentioned below... 1) Login to pngpcdb1 using your user/pass 2) type 'bash' (without quotes) 3) ssh-keygen #generates private and public key. 4) copy this private key to the location of your sftp... (1 Reply)
Discussion started by: karan2597
1 Replies

5. UNIX for Dummies Questions & Answers

keygen-ssh

Hi, I was going thruough the password less authentication of keygen-ssh that will help us in generating keys...One thing that is not clear to me that if in nearby future we conncet to remote ftp server in that case now we need to only provide the user id itself that is password would not be... (1 Reply)
Discussion started by: rahul125
1 Replies

6. UNIX for Dummies Questions & Answers

ssh-keygen

Hi, I am new to unix, recently i was exploring password less remote connection to the ftp server and in that I was exploring the ssh-keygen utility, that it generates private & public keys that helps in transmitting files in encrypted format.Could you please explain me in detail about the... (1 Reply)
Discussion started by: rahul125
1 Replies

7. UNIX for Dummies Questions & Answers

how to create a public/private key using ssh-keygen

Hi, please guide me create a public/private key using ssh-keygen, lets say I have been access to server named pngpcdb1with a userid and password ...!!! and also please explain in detail the concept of these keys and ssh as I was planning to use them in ftp related scripts..! Thanks in... (1 Reply)
Discussion started by: rahul125
1 Replies

8. Shell Programming and Scripting

Query regarding ssh keygen

Hi, I have two Unix servers A and B. I have a script in server A. I want to connect to server B from A using ssh only and without giving passwords everytime i connect. I went through other posts regarding this and I generated a public key in server A and copied that in server B. Now when I... (3 Replies)
Discussion started by: mick_000
3 Replies

9. AIX

Ssh installation error "RSA key generation failed"

While trying to upgrade ssh from v4.7 to v5.0 on AIX 5.3 TL9, I end up with the following error. Has anyone come across this? Note: openssl has been upgraded to 0.9.8.840 before this upgrade Bala (0 Replies)
Discussion started by: balaji_prk
0 Replies

10. Shell Programming and Scripting

SSH-Keygen script

Hello friends, I wanna to make new script which work as i defined below (1) it connect (using ssh) to remote server (2) remote server having passphrase key with password (3) Generate new passphrase on local machine with random 8 character password. (4) It will atomatically uploaded to... (4 Replies)
Discussion started by: jagnikam
4 Replies
Login or Register to Ask a Question