Sponsored Content
Full Discussion: Ssh-keygen problems
Top Forums UNIX for Beginners Questions & Answers Ssh-keygen problems Post 303032962 by stomp on Wednesday 27th of March 2019 11:09:53 AM
Old 03-27-2019
Hi,

authorized_keys does not contain private keys. It only contains public keys. The private key should not leave the source system.

---

You can check what's really going on by increasing the debug level. If there's the wrong key deposited with ssh-copy-id there definitely went something wrong.

Try again with:

Code:
ssh-copy-id -o LogLevel=DEBUG1 ....

You can increase LogLevel further to DEBUG2 or DEBUG3 for more intense debugging. So you will definitely see what is going on and what file is used, or maybe rejected. If that's still not enough you may use strace, to trace the systemcalls for opening and reading of ssh-copy-id. But I think that won't be necessary.

id_rsa and id_rsa.pub are the default key files when a keypair is generated. These are the key files which are used if nothing is specified.
This User Gave Thanks to stomp For This Post:
 

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Advanced & Expert Users

ssh-keygen configuration problem

I am unable to set password less entry from one server to another even after i have generated public key and have put in the authorized_keys of the target server. When i try to debug the ssh using ssh -v, it gives me debug1: Authentications that can continue:... (14 Replies)
Discussion started by: brandedfundoo
14 Replies

3. UNIX for Advanced & Expert Users

ssh-keygen stops working

Hey guys, I was using ssh-keygen settings for a long time to login on remote machines without password. 2 days back it suddenly stops working, i tried by reset all ssh-keygen setting but it not works. what could be the reason of this issue and how can i resolve this? (2 Replies)
Discussion started by: RohitKJ
2 Replies

4. 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

5. 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

6. 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

7. 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

8. 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

9. AIX

ssh-keygen issue on AIX

Hi , I am trying to create public key on my AIX server on other than home directory.However the command does not ask for Enter file in which to save the key : It is directly taking me to Enter the passphrase. I don't want to save the key in home dir as that is the home dir for other userID... (6 Replies)
Discussion started by: saurau
6 Replies

10. Shell Programming and Scripting

ssh keygen in unix server

I have a central unix server and more than 200 unix server to connect from central server .For this to take place i want to use ssh keygen between & among servers .Do anybody has an idea how to automate this process . The server has same user id and same password (0 Replies)
Discussion started by: gauravsinha
0 Replies
SSH-COPY-ID(1)						    BSD General Commands Manual 					    SSH-COPY-ID(1)

NAME
ssh-copy-id -- copy public keys to a remote host SYNOPSIS
ssh-copy-id [-lv] [-i keyfile] [-o option] [-p port] [user@]hostname DESCRIPTION
The ssh-copy-id utility copies public keys to a remote host's ~/.ssh/authorized_keys file (creating the file and directory, if required). The following options are available: -i file Copy the public key contained in file. This option can be specified multiple times and can be combined with the -l option. If a private key is specified and a public key is found then the public key will be used. -l Copy the keys currently held by ssh-agent(1). This is the default if the -i option was not specified. -o ssh-option Pass this option directly to ssh(1). This option can be specified multiple times. -p port Connect to the specified port on the remote host instead of the default. -v Pass -v to ssh(1). The remaining arguments are a list of remote hosts to connect to, each one optionally qualified by a user name. EXIT STATUS
The ssh-copy-id utility exits 0 on success, and >0 if an error occurs. EXAMPLES
To send a specific key to multiple hosts: $ ssh-copy-id -i /path/to/keyfile.pub user@host1 user@host2 user@host3 HISTORY
The ssh-copy-id utility was written by Eitan Adler <eadler@FreeBSD.org> as a drop-in replacement for an existing utility included with OpenSSH. BSD
February 28, 2014 BSD
All times are GMT -4. The time now is 12:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy