I want to to make it so that when a file looks for a ssh key in /Users/skline/.ssh/id_rsa.pub it automatically also looks into the directory /var/root/.ssh/id_rsa.pub (where my ssh is actually located.) How do I do this on OSX? I am new to the terminal, so thanks :)
If its anything like the SSH I use, then you should be able to use the '-i' option.
e.g. ssh host -i /var/root/.ssh/id_rsa
From the man page:
-i identity_file Selects a file from which the identity (private key) for RSA or DSA authentication is read. The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for pro- tocol version 2. Identity files may also be specified on a per- host basis in the configuration file. It is possible to have multiple -i options (and multiple identities specified in config- uration files).
Or for a permanent solution, add the following option (with path) to your ~/.ssh/config
And again, appropriate man page entry:
IdentityFile Specifies a file from which the user's DSA, ECDSA or DSA authentication identity is read. The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa and ~/.ssh/id_rsa for protocol version 2. Additionally, any identities represented by the authentication agent will be used for authentication. ssh(1) will try to load certificate information from the filename obtained by appending -cert.pub to the path of a specified IdentityFile. The file name may use the tilde syntax to refer to a user's home directory or one of the following escape characters: `%d' (local user's home directory), `%u' (local user name), `%l' (local host name), `%h' (remote host name) or `%r' (remote user name). It is possible to have multiple identity files specified in configuration files; all these identities will be tried in sequence.