disabling interactive password prompt with sshpeer

Matt Mackall mpm at selenic.com
Fri Jan 16 14:43:16 CST 2015


On Fri, 2015-01-16 at 21:38 +0100, Thomas De Schampheleire wrote:
> Hi,
> 
> I'm trying to add remote ssh repo support to Kallithea. When the
> remote ssh repo is accessed using public keys, things work fine.
> 
> However, when password authentication is used, the terminal that
> started the kallithea server process is presented with a password
> prompt, which obviously does not make sense in this case, as the user
> of the web interface does not have access to that server process.
> 
> I want to keep things simple currently, and create the limitation that
> only key-based authentication is allowed, so that no interactive
> prompt is necessary. However, all my attempts are unsuccessful so far.
> 
> The code creates an object of class sshpeer to interact with the
> remote repository. I tried adding interactive=False to the ui object,
> closing stdin, but none of this works. The password prompt is always
> presented.

ssh and friends directly open /dev/tty, specifically to defeat these
sorts of things and get the password prompt to the user without any
interference.

> Any ideas on how to disable the interactive nature of sshpeer in this context?

Change the ssh configuration. See for instance BatchMode and
PasswordAuthentication in ssh_config(5).

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list