[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auth-source source password lookup for ssh + sudo
From: |
Michael Albinus |
Subject: |
Re: auth-source source password lookup for ssh + sudo |
Date: |
Fri, 18 Feb 2022 13:04:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Kai Tetzlaff <tramp@tetzco.de> writes:
Hi Kai,
>>> with auth-source enabled when SSHing to a server with sudo as 2nd hop
>>> like `notroot@host.example.com|sudo:/etc/passwd` TRAMP apparently tries
>>> to look up the sudo password using `user=root, host=host.example.com,
>>> port=sudo` (at least that is what auth-source-pass tells me with
>>> debugging enabled [1]). Now, why does the lookup use `user=root` instead of
>>> `user=notroot`. Is there a way to change that?
>>
>> Could you please be more precise? `notroot@host.example.com|sudo:/etc/passwd`
>> does not look like a valid remote file name.
>
> Sorry, you're right. I meant:
>
> /ssh:notroot@host.example.com|sudo::/etc/passwd
The default password for the "sudo" method is "root", and that's what
Tramp uses. If you want to have another user, apply
/ssh:notroot@host.example.com|sudo:user@:/etc/passwd
Btw, in your example I don't understand why you want to access the
remote host as user "notroot", and afterwards to change the user on that
host to "notroot", again.
> BR, Kai
Best regards, Michael.
- auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/17
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo,
Michael Albinus <=
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/18
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/19
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/19
- Re: auth-source source password lookup for ssh + sudo, Michael Albinus, 2022/02/19
- Re: auth-source source password lookup for ssh + sudo, Kai Tetzlaff, 2022/02/19