Re: [PATCH] Ensure that SSH runs in non-interactive mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, 19 Jul 2008, Fredrik Tolf wrote:

> On Sat, 2008-07-19 at 10:57 -0700, Keith Packard wrote:
> > On Sat, 2008-07-19 at 19:06 +0200, Fredrik Tolf wrote:
> > >  By removing the DISPLAY env variable before forking, SSH
> > > can thus be forced into non-interactive mode, without any obvious
> > > ill effects.
> > 
> > This will keep ssh-askpass from using any X-based password input
> > program.
> 
> Ah, right. Would it be OK to add the `-x' flag to ssh instead?

I think this would be the correct way, together with "-T".

> I imagine that that might make git less portable to SSH implementations 
> other than OpenSSH, but I don't know if that is considered a problem.

Well, this was to be expected, after what I wrote in response to 3. in
http://thread.gmane.org/gmane.comp.version-control.git/76650/focus=2598

Reality always catches up with you, and here again we see that plink and 
other siblings of OpenSSH should be best handled with scripts, preferably 
ones that strip out options they do not recognize.

IOW something like

-- snip --
#!/bin/bash

plinkopt=
while test $# != 0
do
	case "$1" in
	-p)
		plinkopt="$plinkopt -P $2"
		shift
	;;
	-*)
		# unrecognized; strip out
	;;
	*)
		break
	;;
	esac
	shift
done

exec plink $plinkopt "$@"
-- snap --

Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux