Sponsored Content
Top Forums UNIX for Advanced & Expert Users Ssh2 key has been overwritten, need a way to restore Post 302982181 by rbatte1 on Monday 26th of September 2016 05:59:50 AM
Old 09-26-2016
Only the client side account should generate the keys and the server side account would accept the public key into the authorized_keys file if the service side account agrees to being connected to, so your server side account should never have the private key from the client side account.

The public key is very likely still on the client side account. If it is the client side that has been lost and there are no backups, you will need to create a new key and then get the public key onto the servers it needs to connect to.


If you need to open the connection the other way around, then your definition of what is client and what is server is switched and you should really generate a new key for that connection only. The reason for this is that if you have client on host-A trusted to talk to the server host-B and server host-C and you also send the private key to host-B so host-B can act as a client to what now becomes server host-A, it will also be trusted to connect to server host-C because it has the private key.


Does that make sense of have I confused things?



Robin
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

.cshrc and .login overwritten !!

Hi, My account is : abcd I belong to a group: pqrs Some thing straneg happened yesterday. My .cshrc and .login got overwritten into pqrs's .cshrc and .login I obviously did not explicitly overwrite pqrs's .cshrc. Are there any reasons how this could have happened indirectly due to... (5 Replies)
Discussion started by: gjthomas
5 Replies

2. UNIX for Dummies Questions & Answers

Grub Loader entry overwritten

Hello, One of my frend had a problem. He had Windows XP installed on his system. Then he installed Red Hat Linux 8.0 in one of the partitions. After some time his XP got corrupt and then he reinstalled Windows XP. This over wrote the Grub loader entry, and due to this the grub loader is not... (2 Replies)
Discussion started by: rahulrathod
2 Replies

3. AIX

UIDs being overwritten immediately

We have a problem where we delete a user and their associated UID gets dumped back in the UID pool. The if we immediately create a another (new) user, AIX reuses the last UID, the one that was just released. This is causing a problem when reports are being generated because the new users name is... (2 Replies)
Discussion started by: xsys2000
2 Replies

4. AIX

mksysb restore - Wrong OS level for restore

Hi all, I am still working on my mksysb restore. My latest issue is during an alt_disk_install from tape I got the following error after all the data had been restored. 0505-143 alt_disk_install: Unable to match mksysb level 5.2.0 with any available boot images. Please correct this... (0 Replies)
Discussion started by: pobman
0 Replies

5. Solaris

overwritten rootdisk?

Hi, The dump device on my system was set to /dev/dsk/c0t0d0s7. I have done a savecore -Lv on the system which worked fine. I'm wondering have I overwritten the rootdisk here by mistake? The system is still up but will need to be rebooted due to an error on it. Will it come back up? ... (8 Replies)
Discussion started by: gwhelan
8 Replies

6. Programming

variables overwritten

Hi, i have some problems with the following code: char *tab_path; char *sep=" \t\n"; char line; char *p; FILE * file; int i = 0; if(fgets(line,MAXLINE,file)!=NULL){ if((p=strtok(line,sep))!=NULL)tab_path=p; while((p=strtok(NULL,sep))!=NULL){ i++; ... (4 Replies)
Discussion started by: littleboyblu
4 Replies

7. Shell Programming and Scripting

file is getting overwritten

Hello All, I am writing a bash script on Solaris O/S. I looping through an array. For each iteration, i connect to the datatabase and use select statement. Output of which is redirected to .CSV file. here is the code for it. output="loop.csv" elements=${#currency_pair} ... (3 Replies)
Discussion started by: arundhati_s
3 Replies

8. Cybersecurity

Request for SSH2 public key

Hey all, I have a request from a third party that will be setting my firm up for an account so we can sftp files to their server in a Production environment. I know where the public keys are located on our Red Hat Linux envronment. I was going to ftp the keys from the Linux environment over to my... (2 Replies)
Discussion started by: dfb500
2 Replies

9. HP-UX

SSH2 - signature didn't match with host key

I am trying to complete ssh2 connection between HP-UX and CoreFTP. The host key authentication fails with signature didn't match. See below output. I can connect to this CoreFTP from my Windows desktop, and connect to a multitude of other servers from the HP-UX system as well, but have... (2 Replies)
Discussion started by: Stars
2 Replies

10. Shell Programming and Scripting

How to preserve the value of a variable from being overwritten?

Hi All, I am new new to unix.com, I have a question related to shell scripting. We have a Oracle database backup shell script, which can be used for taking full, incremental & archive log backup based on the parameters passed. Within the script we export a variable as export... (5 Replies)
Discussion started by: veeresh_15
5 Replies
EVP_PKEY_cmp(3SSL)						      OpenSSL							EVP_PKEY_cmp(3SSL)

NAME
EVP_PKEY_copy_parameters, EVP_PKEY_missing_parameters, EVP_PKEY_cmp_parameters, EVP_PKEY_cmp - public key parameter and comparison functions SYNOPSIS
#include <openssl/evp.h> int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from); int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b); int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); DESCRIPTION
The function EVP_PKEY_missing_parameters() returns 1 if the public key parameters of pkey are missing and 0 if they are present or the algorithm doesn't use parameters. The function EVP_PKEY_copy_parameters() copies the parameters from key from to key to. The funcion EVP_PKEY_cmp_parameters() compares the parameters of keys a and b. The funcion EVP_PKEY_cmp() compares the public key components and parameters (if present) of keys a and b. NOTES
The main purpose of the functions EVP_PKEY_missing_parameters() and EVP_PKEY_copy_parameters() is to handle public keys in certificates where the parameters are sometimes omitted from a public key if they are inherited from the CA that signed it. Since OpenSSL private keys contain public key components too the function EVP_PKEY_cmp() can also be used to determine if a private key matches a public key. RETURN VALUES
The function EVP_PKEY_missing_parameters() returns 1 if the public key parameters of pkey are missing and 0 if they are present or the algorithm doesn't use parameters. These functions EVP_PKEY_copy_parameters() returns 1 for success and 0 for failure. The function EVP_PKEY_cmp_parameters() and EVP_PKEY_cmp() return 1 if the keys match, 0 if they don't match, -1 if the key types are different and -2 if the operation is not supported. SEE ALSO
EVP_PKEY_CTX_new(3), EVP_PKEY_keygen(3) 1.0.1e 2014-08-06 EVP_PKEY_cmp(3SSL)
All times are GMT -4. The time now is 10:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy