From: Eric S. Raymond Date: Tue, 4 Nov 2008 19:17:40 +0000 (+0000) Subject: Minor tweaks. X-Git-Tag: 1.5~5 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=034301209de487d3d9a72e1db68baffae1456eef;p=ssh-installkeys.git Minor tweaks. --- diff --git a/ssh-installkeys b/ssh-installkeys index 02da304..7523b58 100755 --- a/ssh-installkeys +++ b/ssh-installkeys @@ -15,7 +15,7 @@ Options: Author: Eric S. Raymond """ -# $Id: ssh-installkeys,v 1.17 2004/03/11 23:19:16 esr Exp esr $ +# $Id: ssh-installkeys,v 1.18 2004/06/21 12:53:48 esr Exp esr $ import os, sys, getopt, string, getpass, tempfile @@ -64,7 +64,7 @@ A critical module was not found. Probably this OS does not support it. Currently pexpect is intended for UNIX operating systems (including OS-X).""" __version__ = '0.94' -__revision__ = '$Revision: 1.17 $' +__revision__ = '$Revision: 1.18 $' __all__ = ['ExceptionPexpect', 'EOF', 'TIMEOUT', 'spawn', '__version__', '__revision__'] @@ -680,17 +680,17 @@ if __name__ == '__main__': except: die("Can't find your home directory!") if not os.access(".", os.R_OK): - die("Your home directory is not readable by you. That's weird.") + print "Your home directory is not readable by you. That's weird." die("This probably means $HOME is incorrect.") if not os.path.exists(".ssh"): print "You have no .ssh directory." - if check: + if not check: print "Creating your .ssh directory." os.mkdir(".ssh") else: print "Creation of .ssh suppressed." if not os.access(".ssh", os.R_OK): - die("Your .ssh directory is not readable by you. That's weird.") + print "Your .ssh directory is not readable by you. That's weird." die("This probabably means $HOME is incorrect.") try: os.chdir(".ssh") @@ -743,6 +743,7 @@ if __name__ == '__main__': # OK, install keys remotely if they don't exist if not check and not session.exists("~/.ssh/authorized_keys"): + print "Copying your authorized_keys file to", host session.scp(keyfile, "~/.ssh/authorized_keys") except SystemExit: pass