]> thyrsus.com Git - ssh-installkeys.git/commitdiff
Minor tweaks.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 4 Nov 2008 19:17:40 +0000 (19:17 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 4 Nov 2008 19:17:40 +0000 (19:17 +0000)
ssh-installkeys

index 02da3048fd72d03e31b54c8e532614aa900e36d9..7523b589247aa95bcaf03639ac4a76b2c8fa44d8 100755 (executable)
@@ -15,7 +15,7 @@ Options:
 
 Author: Eric S. Raymond <esr@thyrsus.com>"""
 
-# $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