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.
Asked
Active
Viewed 189 times
0
-
1can you please share the script that you are using ? – asmath Jun 17 '21 at 04:22
-
you can check this article for more info https://www.redhat.com/sysadmin/ssh-automation-sshpass – asmath Jun 17 '21 at 04:23
1 Answers
2
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.

John Mahowald
- 32,050
- 2
- 19
- 34