![]() Substitute with a robust password of your choosing. -pass pass:’’: The password we’ll need to use to decrypt the encrypted remote password.-salt: Using a randomly applied salt value makes the encrypted output different every time, even if the plain text is the same.-iter 100000: Sets the number of computations that PBKDF2 will use.An attacker would need to replicate all of those computations. PBKDF2 requires many computations to perform the encryption. -pbkdf2: Using Password-Based Key Derivation Function 2 (PBKDF2) makes it much more difficult for a brute force attack to succeed in guessing your password.-a: This tells openssl to apply base-64 encoding after the encryption phase and before the decryption phase.We’re using the SHA512 cryptographic algorithm. -md sha512: The message digest (hash) type.enc -aes-256-cbc: The encoding type. We’re using the Advanced Encryption Standard 256-bit key cipher with cipher-block chaining.We’ll take a look at each of them in a moment. The encryption password is used in the encryption and decryption processes. There are a lot of parameters and options in the openssl command. We need to provide an encryption password when we do. We’re going to encrypt that password using openssl. On Manjaro Linux, we can install OpenSSL with: sudo pacman -Sy opensslįinally, to install sshpass, use this command: sudo pacman -Sy sshpassīefore we get into using the openssl command with scripts, let’s become familiar with it by using it on the command line. Let’s say that the password for the account on the remote computer is rusty!herring.pitshaft. ![]() The command to install sshpass is: sudo dnf install sshpass On Fedora, you need to type: sudo dnf install openssl To install sshpass, use this command: sudo apt install sshpass On Ubuntu, type this command: sudo apt get openssl However, if it isn’t, it only takes a moment to install. RELATED: How to Create and Install SSH Keys From the Linux Shell Installing OpenSSL and sshpassīecause a lot of other encryption and security tools use OpenSSL, it might already be installed on your computer. We’re going to make use of the well-known OpenSSL toolkit to handle the encryption and a utility called sshpass to feed the password into the SSH command.
0 Comments
Leave a Reply. |