-   Linux - Newbie (
-   -   uploading ssh public using web browser from Debian Linux (

acute123 01-15-2009 05:07 AM

uploading ssh public using web browser from Debian Linux
Hi Everyone

I want to upload my SSH public key on a website using my web browser(this is the only available option).

My public key is present in /root/.ssh/

When i try to upload this from my web browser i have to give a path but i cannot see when i browse. Although i have enabled "show hidden files" option. That is why i can see .ssh folder but i cannot see files within .ssh using my web browser.

Any quick response is really appreciated.


jschiwal 01-15-2009 05:19 AM

First of all, /root/.ssh/ isn't your public key. It is the public key of the root user. Your public key is in ~/.ssh/ You may not have created one using the "ssh-keygen" program.

You shouldn't be able to browse inside the /root directory at all because you don't have permission to enter the /root directory, let alone the /root/.ssh/ directory.

acute123 01-15-2009 05:33 AM

Thank You for your reply.

I generated key using keygen program ssh-keygen. When i did that i was a root user having taken root priviledges by using su.

Keys are there. But when i try to upload via my browser i can reach upto .ssh because i have enabled "show hidden files". Otherwise i would not have been able to see .ssh in the root folder(/root/.ssh).

But the problem is that even after doing so i cannot see any files in /root/.ssh when accessed through web browser.

I can see them from terminal.


jschiwal 01-16-2009 07:38 PM

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.

acute123 01-17-2009 10:58 AM

Thank you for your reply. I generated public key as an ordinary user and then i was able to upload it using my web browser because now the key was in user's folder not in the root's folder.

Thank you once again for your reply.


jschiwal 01-19-2009 07:00 PM

Good Luck!

All times are GMT -5. The time now is 10:47 AM.