- 1)
% ssh-keygen -t rsa -b 4096 Generating public/private rsa key pair.
Enter file in which to save the key (~/.ssh/id_dsa): (just press Enter)
Enter passphrase (empty for no passphrase): (enter a passphrase and then press Enter or if you don't want want one just press Enter)
Enter same passphrase again: (repeat last action)
Your identification has been saved in ~/.ssh/id_rsa
Your public key has been saved in ~/.ssh/id_rsa.pub
The key fingerprint is:
A long string appears here
% - 2)
Paste the content of the ~/.ssh/id_dsa.pub file that just got generated on your local host into the file ~/.ssh/authorized_keys on the remote host and save. - 3)
Set proper permissions on your local host keys and .ssh directory:
chmod 700 ~/.ssh
chmod 644 ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
set proper permissions on your remote host authorized_keys and .ssh directory
chmod 700 ~/.ssh
chmod 644 ~/.ssh/authorized_keys
Showing posts with label tar bar. Show all posts
Showing posts with label tar bar. Show all posts
How to setup SSH private and public keys
Labels:
authorized_keys,
automation,
chmod,
Enterpise Linux,
id_rsa,
id_rsa.pub,
linux,
linux administraion,
passphrase,
permissions,
private key,
public key,
redhat,
REL,
rsa,
shell,
ssh,
ssh-keygen,
tar bar,
unix
Using md5 checksum to check for integrity of your large uploaded/downloded file
Have you ever downloaded/uploaded a file from/to another computer and wanted to verify the integrity of the file to make sure it is not corrupted. The obvious way is to compare the file size of the original final and the copied file. However there are many ways that this number could mislead you.
Just to give two examples, in some cases the program you use to download/upload the file can fail to fill in all the data and just pad the file to the correct size. Hardware errors such as disk and memory issues can cause corruptions too that won't effect the file size. So how do you make sure your file is not corrupted and check the integrity of your downloaded/uploaded file.
On Linux/Unix you can use md5sum. The way to use it is to simply run :
md5sum [yourfile]
This prints out something like :
16295afa0087ef75f33751cf003da993 [yourfile]
You will need to run the above command on both the origin of the file and it's destination and compare the digital fingerprint of the file printed. For unique files that fingerprint will be the same.
A lot of websites that let users download files ( specially large files which have a higher chance of getting corrupted in transit ) will provide checksums for their files which you can compare against your when you download is done.
Just to give two examples, in some cases the program you use to download/upload the file can fail to fill in all the data and just pad the file to the correct size. Hardware errors such as disk and memory issues can cause corruptions too that won't effect the file size. So how do you make sure your file is not corrupted and check the integrity of your downloaded/uploaded file.
On Linux/Unix you can use md5sum. The way to use it is to simply run :
md5sum [yourfile]
This prints out something like :
16295afa0087ef75f33751cf003da993 [yourfile]
You will need to run the above command on both the origin of the file and it's destination and compare the digital fingerprint of the file printed. For unique files that fingerprint will be the same.
A lot of websites that let users download files ( specially large files which have a higher chance of getting corrupted in transit ) will provide checksums for their files which you can compare against your when you download is done.
Subscribe to:
Comments (Atom)