accessing Keychain Access from terminal - OSX I am on OSX and using my terminal to access my Keychain Access. So I use this command

security find-internet-password -a myaccount -s myservice -g


and it works correctly but before I can get the response to this query, there is a pop-up showing and telling me that security wants to use confidential data kept in the Keychain... (translated from french). Why is it so? How can I desactivate it? 

Btw, I tried to ssh to my own computer, in order to prevent the popup to show, but then I got no output when I ran the same command...
You can deactivate the message by adding security to the list of applications allowed to access the entry inside Keychain Access.app:



You can also add an allowed application to an already existing item using the CLI (you will get a GUI box asking for confirmation though):

security add-generic-password -a ${USER} -s playground -T /usr/bin/security -U

-T is the path of the application you want to authorize and -U is to update entry if it already exists (what's called an "upsert" in some databases). (and playground is the name of my test entry).

See man security (or the online version) for further reference.