Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i am trying to install sshpass following error occured,


pc-20-b102in:~$ sudo apt-get install sshpass
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package sshpass

What I have tried:

when i am trying to install sshpass following error occured,


pc-20-b102in:~$ sudo apt-get install sshpass
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package sshpass
Posted
Updated 14-Aug-18 7:31am

Update the package list first:
sudo apt-get update

Then check if the package is available:
txt
apt-cache search sshpass

If that succeeds, installing should be possible.

If not, check your repositories. The list is stored in the file /etc/apt/sources.list and within files at /etc/apt/sources.list.d/.

To add repositories use
sudo add-apt-repository <repo>

The default repositories are main, restricted, universe, and multiverse.
 
Share this answer
 
This just work for me, just follow this link:

https://www.tecmint.com/sshpass-non-interactive-ssh-login-shell-script-ssh-password/
 
Share this answer
 
Comments
CHill60 13-Aug-18 8:16am    
I'm prepared to give you the benefit of the doubt this time, but just to let you know, posting links as solutions to old questions can often perceived as site-driving.
Hi,

Even I had faced the same issue. As mentioned in Solution 1, after adding the repository, the reported error was resolved.

sudo add-apt-repository universe

Thanks for the pointers Jochen Arndt.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900