Linux machine encrypt and decrypt a password string

 

1)For encrypt use below command: for the password" Ranjith" 

echo Ranjith | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint


[root@ranjith]# echo Ranjith | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint

U2FsdGVkX1/lvI5yT7l7fPeg/thWbJN76DlM++FltEKqWUzJKGSjo


2)To decrypt the above encrypted string use:

echo <> | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint

[root@ranjith]# echo U2FsdGVkX1/lvI5yT7l7fPeg/thWbJN76DlM++FltEKqWUzJKGSjo | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint
Ranjith


No comments:

Post a Comment

how to unlink a NIC from a esxi vSwitch

  List the vSwitches from ESXI using CLI:          esxcli network vswitch standard list  output example: vSwitch0    Name: vSwitch0    Class...