Command-line keychain access not showing any results I have been trying to learn to control my computer through command-line, and keychain access is what I am trying now. I have been using the security command, and attempting to get my wifi password (I know it of course, but getting it through terminal is the challenge). From what I have read on other Stack Exchange pages (like this one) and this often referenced site, 

security find-generic-password -a Netgear25 -s Airport -g


should come up with a list of information, including the password. But there is no output at all. So the 'result' is: 

Host:~ Batman$ security find-generic-password -a Netgear25 -s Airport -g
Host:~ Batman$


nothing. 

security 2&gt;&amp;1 &gt;/dev/null find-generic-password -a Netgear25 -s Airport -g security 


does the same thing, no result. What am I going wrong?

EDIT

I think I should clarify - I am doing this remotely for a challenge, and obviously when I do it on the computer itself it comes up with the Authorisation Dialog Box. Remotely though, the dialog box won't come up. So the real question is how to authenticate it remotely (using sudo also comes up with no result).
I have not scored enough points (yet) to mark this as a duplicate, but on  How can I access the keychain remotely from the command line? you will find the solution to help you out here.

In short: Add "security" to the "Access Control", re-login and run security unlock-keychain ~/Library/Keychains/login.keychain before running security find-generic-password.