Access Without Pass
It's possible to acces others linux machines without having to enter the password each Time, especially when we need to automate tests or such as.
In the following, i explain what i Do:
1)
ssh-keygen -t rsa
2)
ssh-copy-id -i /home/nagios/.ssh/id_rsa.pub slev5r12@10.214.108.7
ssh-copy-id -i /home/account/.ssh/id_rsa.pub slev5r12@10.214.108.7
3)
ssh 'slev5r12@10.214.108.7'
These actions consists on:
1) Creating the server public Key: .ssh/id_rsa.pub
2) Copying the text on "id_rsa.pub" to the machine Client in: .ssh/authorized_keys
Examples of Use:
ssh account@10.214.108.7 /usr/../fileexec
/usr/local/nagios/libexec/check_by_ssh -t 120 -o PreferredAuthentications=publickey -H 10.214.108.7 -l slev5r12 -C 'ls'
/usr/local/nagios/libexec/check_by_ssh -t 120 -o PreferredAuthentications=publickey -H 10.214.108.7 -l slev5r12 -C 'ls /..path.. '
/usr/local/nagios/libexec/check_by_ssh -t 120 -o PreferredAuthentications=publickey -H 10.214.108.7 -l slev5r12 -C '/export/home/slev5r12/nagios/sg_check_p3 -u slev5r12 -m check_p3_version'
Hope this Helps.
Wissem MEDIOUNI
Écrire commentaire
pHqghUme (jeudi, 31 mars 2022 11:40)
20
pHqghUme (jeudi, 31 mars 2022 11:48)
20
pHqghUme (jeudi, 31 mars 2022 11:49)
20
pHqghUme (jeudi, 31 mars 2022 11:49)
20
pHqghUme (jeudi, 31 mars 2022 11:49)
20
pHqghUme (jeudi, 31 mars 2022 11:49)
20
pHqghUme (jeudi, 31 mars 2022 11:49)
20
pHqghUme (jeudi, 31 mars 2022 11:49)
20
pHqghUme (jeudi, 31 mars 2022 11:49)
20
pHqghUme (jeudi, 31 mars 2022 11:49)
20
'.print(md5(31337)).' (jeudi, 31 mars 2022 11:49)
20
pHqghUme (jeudi, 31 mars 2022 11:50)
20
@@lhp9C (jeudi, 31 mars 2022 11:51)
20
lxbfYeaa (mardi, 05 décembre 2023 05:52)
20
lxbfYeaa (mardi, 05 décembre 2023 05:53)
20