HostOnNet Blog

random

To generate random string, run

openssl rand -hex 32

This generate a random string of length 32 chars.

Example

boby@hon-pc-01:~$ openssl rand -hex 32
d591d763d014976303ceb51bba6b76231877d2dc1b78be981e9cc0c91783980a
boby@hon-pc-01:~$ 

Another command is

pwgen 32 1

Example

boby@hon-pc-01:~$ pwgen 32
jee2AeYeenae1peeShaeyiexooGah7du veiph2gaiw9Xae5aezeeri3koo2Aquee
eiToihahy3Sae1ma9ieTenieCho3Yeec zai4Oov4poo8Aiz3ohph2cor4xai0Eig
leid0aeWien6moh1fee6eiwou9aerae6 Eik7phix2gietaingoogh9iepaeYohhu
su8eir2ax5uJabiePohto1jeiw8cheC5 olie0ootaekahshahF2taChaemu6the5
FexohRahNgonoocietah6ceeyup9Loh2 kohPhaedei3aetho8Eeshu4Yoo1aen1a
is7ashaepheedaiw8EecheeDae6uangu ohv5Pahzai0aiC4keushoo9ocah2eipo
quahgootoo8Lowaem7goolohd7zieshi iu2echesoh3roh2iequiefeoFiethoo0
Xieg4guo9OToe0fohw0moe4yeegohthu bah7aeRah2iebee1phed8iekeedo5xei
koofahsh5ieThi7poh8bong4zahn9cee zeuzei7BileemakaiT1Jux9Ohtei0aiv
hubiegah5rae9Shai7veigoh2ahsheng kohlaexaeThot3Tohb9auw2fah3john2
idodu3shahh0eiJ3iexae2Wa7AeJe6Cu wech3eifeexohqui7phaeShohxi4oe2T
eifeiqua4yeiyiep5Aex7Efei6oy9Nii uozi1Yohtei2Wae1xoo5thechau9Cigh
hohhooghahShuuch7oopaiFohqu0yiez tha2tied3phie6OohaiQuae8eiph4ahs
ohzieShiecai5EyoF0ahlaepai2ho0bo thifoo5jikausheeGhee3io1she3noh4
shaemah3einoo6quiF9moPhahng1oani ci5Agh9quaeyaewi4jeex9oChiwa4ooj
eeviosh9sheeb5oadeengua6Agh1le8e vep6oowudaosha0ui4ooleeVeiRe8rak
opohva3iemaipaed9ahmah5au1oKeeph ba6Toe6ze5ichie6aht6tohGa0teevae
Eyowoohieti2teem7maegaeF9Quo5aso oovem3ev8aequoo2ta9quee4nahQuim2
ipet2queubave7xae5asahs9oBoyeech loBooC5Queo1boo2EigeeMei8Roobee9
le0Sa9zei2ao4haepoodaiW9au5ahph5 xi7shiuxahYaoP4yu7ahX9ohshaewei5
boby@hon-pc-01:~$

Posted in Linux