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

Re: OpenSSH uploaded replacing ssh, please test

On Thu, Nov 04, 1999 at 12:40:10PM +0200, Tommi Virtanen wrote:
> 	Here's a patch to make it use ssh-askpass, now someone
>         needs to provide a free ssh-askpass too..

	And here's ssh-askpass too. Consider it public domain.
Havoc Consulting | unix, linux, perl, mail, www, internet, security consulting
+358 50 5486010  | software development, unix administration, training
#!/usr/bin/perl -w
use strict;
use Tk;

sub do_it($$;) {
  my ($passphrase, $main) = @_;
  print $passphrase->get(), "\n";

sub ask($;) {
  my ($prompt)=@_;
  my $main=MainWindow->new;
  my $passphrase=$main->Entry(-show=>'*')->pack(-fill=>'x');
  my $buttons=$main->Frame;
  my $ok=$buttons->Button(-text=>'Ok', 
                          -command=>sub {do_it $passphrase, $main}
  my $cancel=$buttons->Button(-text=>'Cancel', -command=>[$main=>'destroy'])
  $main->bind('Tk::Button', '<Return>' => 'invoke');
  $main->bind('<Return>', [$ok => 'invoke']);
  $main->bind('<Escape>', [$cancel => 'invoke']);
  $main->bind('<Visibility>' => [$main => 'grabGlobal']); 


ask ($#ARGV==0
     ? $ARGV[0]
     : 'Please enter your authentication passphrase:');

Reply to: