How can I obtain and set the security context for a linked server connection?

Most of the connection details are available from the sys.servers table, but
not this.
I am referring specifically to the Remote login and With password entries on
the Security page of the Linked Server properties page below the "For a login
not defined in the list above, connections will:"

My goal is to create a script to automate the process of obtaining/updating
these values when we update logins and/or passwords used for these
connections.

TIA