Sponsored Content
Top Forums UNIX for Advanced & Expert Users Ssh2 key has been overwritten, need a way to restore Post 302982116 by freakygs on Saturday 24th of September 2016 06:49:30 AM
Old 09-24-2016
Ssh2 key has been overwritten, need a way to restore

I had generated a ssh2 key on my AIX box, to receive files from other AIX and Linux systems.

Key Name: id_ssh2_server.pub

However this ssh2 key (both public and private keys) has been overwritten, while I was generating another ssh2 key. Now the earlier configured target systems are not able to connect to my AIX box.

Is there any way to restore the earlier key?
Unfortunately the tape backups are not taken for the directory where key is residing.
 

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
SSH2_PUBLICKEY_ADD(3)							 1						     SSH2_PUBLICKEY_ADD(3)

ssh2_publickey_add - Add an authorized publickey

SYNOPSIS
bool ssh2_publickey_add (resource $pkey, string $algoname, string $blob, [bool $overwrite = false], [array $attributes]) DESCRIPTION
Note The public key subsystem is used for managing public keys on a server to which the client is already authenticated. To authenticate to a remote system using public key authentication, use the ssh2_auth_pubkey_file(3) function instead. PARAMETERS
o $pkey - Publickey Subsystem resource created by ssh2_publickey_init(3). o $algoname - Publickey algorithm (e.g.): ssh-dss, ssh-rsa o $blob - Publickey blob as raw binary data o $overwrite - If the specified key already exists, should it be overwritten? o $attributes - Associative array of attributes to assign to this public key. Refer to ietf-secsh-publickey-subsystem for a list of supported attributes. To mark an attribute as mandatory, precede its name with an asterisk. If the server is unable to support an attribute marked mandatory, it will abort the add process. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Adding a publickey with ssh2_publickey_add(3) <?php $ssh2 = ssh2_connect('shell.example.com', 22); ssh2_auth_password($ssh2, 'jdoe', 'password'); $pkey = ssh2_publickey_init($ssh2); $keyblob = base64_decode(' AAAAB3NzaC1yc2EAAAABIwAAAIEA5HVt6VqSGd5PTrLRdjNONxXH1tVFGn0 Bd26BF0aCP9qyJRlvdJ3j4WBeX4ZmrveGrjMgkseSYc4xZ26sDHwfL351xj zaLpipuBGRrw17mWVBhuCExo476ri5tQFzbTc54VEHYckxQ16CjSTibI5X 69GmnYC9PNqEYq/1TP+HF10='); ssh2_publickey_add($pkey, 'ssh-rsa', $keyblob, false, array('comment'=>"John's Key")); ?> SEE ALSO
ssh2_publickey_init(3), ssh2_publickey_remove(3), ssh2_publickey_list(3). PHP Documentation Group SSH2_PUBLICKEY_ADD(3)
All times are GMT -4. The time now is 07:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy