* How to Tramp with ssh and sudo?
@ 2020-01-08 13:42 Pankaj Jangid
2020-01-08 13:53 ` Michael Albinus
0 siblings, 1 reply; 8+ messages in thread
From: Pankaj Jangid @ 2020-01-08 13:42 UTC (permalink / raw)
To: Emacs mailing list
Need some help with Tramp. I know that to access a remote file the path
is
/ssh:user@host:/path/to/file
For privileged file on local machine, it is
/sudo::/path/to/file
I want to combine the above two i.e. I want to access a privileged file
on a remote machine. What is the path for that?
Regards
--
Pankaj Jangid
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to Tramp with ssh and sudo?
2020-01-08 13:42 How to Tramp with ssh and sudo? Pankaj Jangid
@ 2020-01-08 13:53 ` Michael Albinus
2020-01-10 9:08 ` Pankaj Jangid
0 siblings, 1 reply; 8+ messages in thread
From: Michael Albinus @ 2020-01-08 13:53 UTC (permalink / raw)
To: Pankaj Jangid; +Cc: Emacs mailing list
Pankaj Jangid <p4j@j4d.net> writes:
Hi,
> Need some help with Tramp. I know that to access a remote file the path
> is
>
> /ssh:user@host:/path/to/file
>
> For privileged file on local machine, it is
>
> /sudo::/path/to/file
>
> I want to combine the above two i.e. I want to access a privileged file
> on a remote machine. What is the path for that?
/ssh:user@host|/sudo:host:/path/to/file
> Regards
Best regards, Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to Tramp with ssh and sudo?
2020-01-08 13:53 ` Michael Albinus
@ 2020-01-10 9:08 ` Pankaj Jangid
2020-01-10 9:22 ` tomas
2020-01-10 9:23 ` Michael Albinus
0 siblings, 2 replies; 8+ messages in thread
From: Pankaj Jangid @ 2020-01-10 9:08 UTC (permalink / raw)
To: Michael Albinus; +Cc: Emacs mailing list
Michael Albinus <michael.albinus@gmx.de> writes:
> /ssh:user@host|/sudo:host:/path/to/file
I typed exactly this with appropriate user and host values. But this
didn't work. My remote host is a raspbery-pi
C-x C-f /ssh:pi@192.168.0.3|/sudo:192.168.0.3:/etc/wpa_supplicant/wpa_supplicant.conf <RET>
This didn't work.
Regards
--
Pankaj Jangid
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to Tramp with ssh and sudo?
2020-01-10 9:08 ` Pankaj Jangid
@ 2020-01-10 9:22 ` tomas
2020-01-10 11:47 ` Pankaj Jangid
2020-01-10 9:23 ` Michael Albinus
1 sibling, 1 reply; 8+ messages in thread
From: tomas @ 2020-01-10 9:22 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 635 bytes --]
On Fri, Jan 10, 2020 at 09:08:40AM +0000, Pankaj Jangid wrote:
> Michael Albinus <michael.albinus@gmx.de> writes:
> > /ssh:user@host|/sudo:host:/path/to/file
>
> I typed exactly this with appropriate user and host values. But this
> didn't work. My remote host is a raspbery-pi
>
> C-x C-f /ssh:pi@192.168.0.3|/sudo:192.168.0.3:/etc/wpa_supplicant/wpa_supplicant.conf <RET>
>
> This didn't work.
How does your "not work" look, exactly? Any error messages? Emacs
hangs? It gives you an empty buffer and says it's a new file?
Hint: the more details you give, the more you help others help you :)
Cheers
-- tomás
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to Tramp with ssh and sudo?
2020-01-10 9:22 ` tomas
@ 2020-01-10 11:47 ` Pankaj Jangid
2020-01-10 13:50 ` tomas
0 siblings, 1 reply; 8+ messages in thread
From: Pankaj Jangid @ 2020-01-10 11:47 UTC (permalink / raw)
To: tomas; +Cc: help-gnu-emacs
<tomas@tuxteam.de> writes:
>> Michael Albinus <michael.albinus@gmx.de> writes:
>> > /ssh:user@host|/sudo:host:/path/to/file
>>
>> I typed exactly this with appropriate user and host values. But this
>> didn't work. My remote host is a raspbery-pi
>>
>> C-x C-f
>> /ssh:pi@192.168.0.3|/sudo:192.168.0.3:/etc/wpa_supplicant/wpa_supplicant.conf
>> <RET>
>>
>> This didn't work.
>
> How does your "not work" look, exactly? Any error messages? Emacs
> hangs? It gives you an empty buffer and says it's a new file?
Really sorry about that. Actually, I copied the message but forgot to
yank in the message buffer before sending. The problem got solved with
Michael's help. But the message in the message area was
M-x make-directory <RET> <RET> to create the directory and its parents
Regards,
--
Pankaj Jangid
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to Tramp with ssh and sudo?
2020-01-10 9:08 ` Pankaj Jangid
2020-01-10 9:22 ` tomas
@ 2020-01-10 9:23 ` Michael Albinus
2020-01-10 11:43 ` Pankaj Jangid
1 sibling, 1 reply; 8+ messages in thread
From: Michael Albinus @ 2020-01-10 9:23 UTC (permalink / raw)
To: Pankaj Jangid; +Cc: Emacs mailing list
Pankaj Jangid <p4j@j4d.net> writes:
> I typed exactly this with appropriate user and host values. But this
> didn't work. My remote host is a raspbery-pi
>
> /ssh:pi@192.168.0.3|/sudo:192.168.0.3:/etc/wpa_supplicant/wpa_supplicant.conf
D'oh! There's a typo.
/ssh:pi@192.168.0.3|sudo:192.168.0.3:/etc/wpa_supplicant/wpa_supplicant.conf
> Regards
Best regards, Michael.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to Tramp with ssh and sudo?
2020-01-10 9:23 ` Michael Albinus
@ 2020-01-10 11:43 ` Pankaj Jangid
0 siblings, 0 replies; 8+ messages in thread
From: Pankaj Jangid @ 2020-01-10 11:43 UTC (permalink / raw)
To: Michael Albinus; +Cc: Emacs mailing list
Michael Albinus <michael.albinus@gmx.de> writes:
>> I typed exactly this with appropriate user and host values. But this
>> didn't work. My remote host is a raspbery-pi
>>
>> /ssh:pi@192.168.0.3|/sudo:192.168.0.3:/etc/wpa_supplicant/wpa_supplicant.conf
>
> D'oh! There's a typo.
>
> /ssh:pi@192.168.0.3|sudo:192.168.0.3:/etc/wpa_supplicant/wpa_supplicant.conf
Best!!!
This worked. Thanks a lot, Michael.
Regards,
--
Pankaj Jangid
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-01-10 13:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-08 13:42 How to Tramp with ssh and sudo? Pankaj Jangid
2020-01-08 13:53 ` Michael Albinus
2020-01-10 9:08 ` Pankaj Jangid
2020-01-10 9:22 ` tomas
2020-01-10 11:47 ` Pankaj Jangid
2020-01-10 13:50 ` tomas
2020-01-10 9:23 ` Michael Albinus
2020-01-10 11:43 ` Pankaj Jangid
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).