Getting PGP private key [closed] - pgp

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I would like to know how data encryption and decryption works in PGP. As part of encryption, "gpg --gen-key" is used to generate the keys, And I got a public key, however I am not sure how to get private key. does it store in a specific location? is there any command to generate? I don't have any clue.
This is not specified in the document that I am following.

The private key is not "visible" like the public one, but you can get it following these instructions:
You can list private keys this way, in order to check if it exists:
gpg --list-secret-keys
And you can make it visible doing a backup of your keys:
gpg --armor --export-secret-keys your_email#domain.com > your_name.asc

Related

Empty string as map key in Go? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
Is it a good or bad practice to store to store "" as a map key in Go? It seems like a special case which wouldnt be ideal for storage as a key. What do you think?
The empty string value "" is a valid value for the string type, so it's a valid key value for maps having string as the key type. There's nothing "edge" case in that.
Whether it makes sense to store a value associated with the empty string key really depends on your use case. There's nothing good or bad in it. Use it if it has meaning for you.

Sanity check SSH public key? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have asked users for their public "id_rsa.pub" ssh key, that I then place in "/home/theiraccount/.ssh/authorized_keys", so they can login to the server by SSH. I'd like to automate this process.
Is there anyway to sanity check the string they give me (programmatically or otherwise)? I want to verify that sshd can read the text and that it actually looks like a valid public key (and hasn't been corrupted)?
Put another way, what is the format of the id_rsa.pub file? If someone enters it in a field what can I write in the form handler script to verify that it is complete and correct?
ssh-keygen can be used to calculate the fingerprint of a key file, which will fail if you don't pass it a key:
ssh-keygen -l -f id_rsa.pub
Another possibility would be ssh-vulnkey, that would have the advantage of checking the keys against the blacklist of known compromised keys at the same time.

Change hostname on SSH session [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
When I SSH into my server, it has a really long name
user#this-is-a-really-really-really-really-long-server-name:~$
How can I change this to
user#short-name:~$
I'm not sure what to even google for.
Like Matt said. There is similar question on Unix.stackexchange
And you find some Background
here
Modify PS11
PS1="touch me : "
question is if you want to really change the hostname of the server, or only whats displayed at the beginning of the cli.
if you want to change the hostname, you better check specifically for your distribution.
if you only want to change what's displayed at the beginning of the cli, alter the ${PS1} variable via ~/.bashrc (user specific) or /etc/profile (global) or something like that.

How can I get the debian weak keys black list [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there a list for RSA black listed debian weak keys? I tried to search, but all what I can find is some tools for checking. What if I want the list itself? Is this available?
It is in packages openssl-blacklist and openssh-blacklist.

lock text files with passwords [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there any way to protect the text file. I want to protect my text files to protect with password. So how is it possible that when client wants to open the text file it asks for password and files can be opened in notepad only after entering the right password. By using this can be make our files secure
Zip it and password protect the entry :) full compatibility with any PC and decent security :) (Zip ueses AES to pretect it's entries).

Resources