Never run a web browser as a root user. What public key do you want to publish? The host key or your own key. Is this to run an automated job on a remote computer via cron? Why does root on your computer need to log into a remote computer.
If this is for automated cron backup or syncing with a server you have on the web, then you would use host keys. The obvious solution is to temporarily copy your computers host public key to your home directory (use the -a option to preserve permissions), and then run your browser as a normal user.
I'm guessing that this is for a remove web app to administer a web server or something similar. If this key is to gain access manually, then use your regular users key. Locally you can log in running as a regular user, even if you are logging into a remote account. If you haven't run "ssh-keygen" as your regular user, then do so.
This is similar to logging into mysql, using "mysql -u root -p". You shouldn't run the mysql client as root simply because you are logging into the root account.
Also, when you said that you could see /root/.ssh in the terminal, did you su to root first or use sudo? If so, you would see the contents, but if you could see the contents of /root as a regular user, you need to fix the permissions of /root and /root/.ssh/. Ssh will reject connections if the permissions are bad.
Last edited by jschiwal; 01-16-2009 at 07:52 PM.
|