Score:0

Expecting a password in the middle of script in RHEL

cn flag

I want to copy files from another server it's expecting a password to copy... Where as sshpass is working in Ubuntu, but in RHEL is there a way to pass the password in the script.

asmath avatar
cn flag
can you please share the script that you are using ?
asmath avatar
cn flag
you can check this article for more info https://www.redhat.com/sysadmin/ssh-automation-sshpass
Score:2
cn flag

sshpass is available from EPEL repository. Technically not a part of CentOS, but easy to enable if you wish.

Passwords are insecure, consider any other method of ssh auth instead. sshpass's reason for existing is a hack to get around OpenSSH intentionally making this difficult.

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.