Re: Password issue using sudo through ssh

2015-08-31 Thread yary
On Mon, Aug 31, 2015 at 9:08 AM, Brice Waegenire 
wrote:

> I enter it but then I get stuck to
> `Found remote shell prompt on foo'.
>

I sometimes also get stuck with that message, and I don't use sudo, I see
it with the plink and pscp methods. I never went to any length to diagnose
it, since I can hit ctrl-G and then tramp-cleanup-all-connections to get
back to a known good state. (It seems to happen after I lose the internet
connection, and reconnect- but not always.) Just thought it might be
helpful to have another data point.

-y
___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Re: Password issue using sudo through ssh

2015-08-31 Thread Michael Albinus
Brice Waegenire  writes:

> Hello all,

Hi Brice,

> I want to access my remote hosts using TRAMP via sudo together with my
> local computer. Unfortunately the sudo remote access is inconsistent.

Could you, please set Tramp verbosity to 6, like (setq tramp-verbose 6)
Rerun your test. There will be a debug buffer; pls show.

Tramp does not write any password into the traces; you might crosscheck
before sending them.

Best regards, Michael.

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel


Password issue using sudo through ssh

2015-08-31 Thread Brice Waegenire
Hello all,

I want to access my remote hosts using TRAMP via sudo together with my
local computer. Unfortunately the sudo remote access is inconsistent.

The first time that I access the remote host with sudo (`C-x C-f
/sudo:foo:/') I get ask to unlock my ssh key, then my sudo password
which I enter, it work I have access to the machine. Quickly after I
clean up the connections (`M-x tramp-cleanup-all-connections') and try
to connect to the same host again, the ssh key is cached by my agent, so
I get asked my sudo password, I enter it but then I get stuck to
`Found remote shell prompt on foo'. Whoever if I just type `RET' when I
get asked my sudo password it work.

I think this is related to my sudo config (`/etc/sudoers') which contain
`Defaults timestamp_timeout=10'. But the thing I find strange is that I
have the same config locally but don't have this issue. I can do `C-x
C-f /sudo::/', I get asked my password and get access, `M-x
tramp-cleanup-all-connections', `C-x C-f /sudo::/' the password is
cached for 10 min so I don't get asked my password and get access. I
would like to have that behavior when I'm connecting remotely and not
having to find out if this time I should enter my password or not.

Can you help me with this?

Following is the configuration I use with with `emacs -Q':
,
| (setq tramp-default-proxies-alist
|   '(((regexp-quote (system-name)) nil nil)
| (nil "\\`root\\'" "/ssh:%h:")))
`

I also tried this configuration, but it broke the sudo local access
(ie `/sudo::/'):
,
| (set-default 'tramp-default-proxies-alist
|  (quote ((".*" "\\`root\\'" "/ssh:%h:"
`

Versions:
• Emacs: 24.5-1
• TRAMP: 2.2.11-24.5

___
Tramp-devel mailing list
Tramp-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/tramp-devel