Back to Browse

RHCSA RHEL 8 - Configure key-based authentication for SSH

6.0K views
Jul 24, 2020
14:41

Your support on Ko-Fi is much appreciated: 👉 https://ko-fi.com/csg_yt Join our new discord channel: 👉 https://discord.gg/kBQ6Jry Buy CSG Merchandise: 👉 http://tee.pub/lic/csg This video is based on RHEL 8. Video to cover the section 'Configure key-based authentication for SSH' for the RHCSA (Red Hat Certified System Administrator). More information on the required learning: http://bit.ly/rhcsa8 Notes from the video: SSH supports key based authentication, that is using certificates to authenticate users to a system. In many cases this is more secure than a username and password as you can have two factor authentication by having a passphrase attached to your private key. As part of the key authentication you will have two key types: Public key – this is the key that you would store in the ~/.ssh/authorized_keys file, this authorises the the key to login to the system. Private key – this key must be kept safe and is the key that we use to login to the system. The major steps are thus: Run: # ssh-keygen This will generate the .ssh directory and the public and private key files. However it will not generate the authorized_keys file to do this go into the home directory of the user you want to allow login to and browse to: # cd .ssh In that directory if not already there we need to create the authorized_keys file: # touch authorized_keys Then we need to ensure the file is owned by the user themselves and that they only have the permission to read and write to that file: # chmod 600 authorized_keys If you are allowing another linux server to login copy the contents of id_rsa.pub (the public key) into the authorized_keys file. This will then provision access. For Windows to Linux we need to generate the key using puttygen.exe. Follow the video to generate the public and private key for the local system and then copy the public key into the Linux server’s authorized_keys file. Then use pageant.exe to load the private key, then when using putty or kitty it will auto login without any prompt for a password. Putty, Pagent and PuttyGen download site: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Kitty download site: http://www.9bis.net/kitty/ #rhcsa #rhel #linux #redhat

Download

0 formats

No download links available.

RHCSA RHEL 8 - Configure key-based authentication for SSH | NatokHD