What Does Sshpass Do in Linux?
Contents

sshpass is a simple and lightweight command line tool that enables us to provide password (non-interactive password authentication) to the command prompt itself, so that automated shell scripts can be executed to take backups via cron scheduler.

What is the use of Sshpass?

What is sshpass? The sshpass utility is designed to run SSH using the keyboard-interactive password authentication mode, but in a non-interactive way. SSH uses direct TTY access to ensure that the password is indeed issued by an interactive keyboard user.

Can we pass password in SSH?

2 Answers. You can not specify the password from the command line but you can do either using ssh keys or using sshpass as suggested by John C. or using a expect script. … As mentioned by Charles Duffy in the comments, it is safer to supply the password from a file or from a variable instead of from command line.

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest