Score:0

sshpass command

bo flag

I am using sshpass command to pass the password where we have created script based on below command

echo "************** Checking Keys Exchange For Database Server *************"

status=$(ssh -o BatchMode=yes -o ConnectTimeout=5 $Username@$IP echo ok 2>&1) --- output is ok if already exchanged and permissioned denied if keys not exchanged

    echo KYES ARE NOT EXCHANGED FOR DATABASE SERVER, PLEASE EXCHANGE THE KEYS

      sshpass -p $password ssh-copy-id $Username@$IP

For some instances sshpass working fine for instances we facing issue like below

/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub" Host key verification failed.

Please help on this as soon as possible or is there any other way to pass password instead of sshpass

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.