0

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.

1 Answers1

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