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>&1 >/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).