[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: editing a remote file which requires sudo
From: |
Michael Albinus |
Subject: |
Re: editing a remote file which requires sudo |
Date: |
Tue, 26 Oct 2010 05:20:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Terrence Brannon <address@hidden> writes:
> When I use that setup above, I was told "Permission denied
> (publickey)." which I think means that my public key is not in the
> /root/.ssh/authorized_keys file. When I inspected that file, I saw
> something in there I had never seen. I thought that file only stored
> public keys, but instead I saw this:
>
> address@hidden:/root/.ssh# cat authorized_keys
> command="echo 'Please login as the ubuntu user rather than root
> user.';echo;sleep 10" ssh-rsa
>
> AAAAB3NzaC1yc2EAAAADAQABAAABAQCmlF98qYSHrlaWuRLVXZ8M/uE/ZmVLhst7mTncAjc8SmEqiknWZOVEkSIG6ZsVWVe5jVOrUn/ESUyofwxAJY6h7TkA2Ks6Xsl7U8zvMy1ACp8/vf2DQz7JuH4JsNRmYwKiVkt4XkqNZcsmEC1RBnSJJj6YUAJMZG+nyzV5xgViXyJQvmh5Kt9TrlzOwa2MudY7iHqdWGkJEDd3LlNtNgNuUQmPWWMCJgQQSzba4ZrLXU5NrlNx+azGcPvFqPl2nCe5UK3Zzd0inJ3Sknk5adEJzQ0XKuiEPdt9awBD/gl0UIme2tm1rSQkqnT3OS/R8nmdKt/OuLoJ
> mydefault
> address@hidden:/root/.ssh#
>
>
> Is it safe to simply append my public key to this file?
Nope. You make an ssh connection to address@hidden; so you must
put your public key in ~ubuntu/.ssh/authorized_keys.
Btw, the settings might be safer when you eval
(add-to-list
'tramp-default-proxies-alist
'("remotedomain.com" "root" "/ssh:address@hidden:"))
Best regards, Michael.