]> thyrsus.com Git - ssh-installkeys.git/commitdiff
Not quite read to ship.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 3 Dec 2003 22:58:22 +0000 (22:58 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 3 Dec 2003 22:58:22 +0000 (22:58 +0000)
ssh-installkeys

index 057a32a391f43205afd24a1043715da1baab85bc..7c31d13e8eb31a777a3834fab60dd3f178f27f91 100755 (executable)
@@ -4,7 +4,8 @@
 This script tries to export ssh public keys to a specified site.  it will
 walk the user through generating key pairs if it doesn't find any to export.
 It handles all the fiddly details like making sure local and remote
-permissions are correct.
+permissions are correct, and tells you what it's doing if it has to change
+anything.
 
 Options:
 
@@ -13,6 +14,8 @@ Options:
 -c        Check local and remote configuration only, dn't try to fix problems.
 -d        Delete remote .ssh configuration.
 -v        Report all commands sent to host and output received.
+
+$Id$ by Eric S. Raymond <esr@thyrsus.com>
 """
 
 # Conditions we don't check yet:
@@ -47,8 +50,8 @@ License: Python Software Foundation License
 
 Noah Spurrier
 
-$Revision: 1.10 $
-$Date: 2002/11/23 06:57:50 $
+$Revision: 1.11 $
+$Date: 2003/01/28 10:40:49 $
 """
 import os, sys
 import select
@@ -69,7 +72,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.10 $'
+__revision__ = '$Revision: 1.11 $'
 __all__ = ['ExceptionPexpect', 'EOF', 'TIMEOUT', 'spawn',
     '__version__', '__revision__']
 
@@ -669,13 +672,6 @@ if __name__ == '__main__':
     if not login:
         login = os.environ.get("LOGNAME")
 
-    if not arguments:
-        print "No remote host specified."
-        print __doc__ % login
-        raise SystemExit, 0
-    else:
-        host = arguments[0]
-
     for (switch, val) in options:
        if (switch == '-c'):
             check = 1
@@ -690,6 +686,13 @@ if __name__ == '__main__':
        elif (switch == '-v'):
            verbose = 1
 
+    if not arguments:
+        print "No remote host specified."
+        print __doc__ % login
+        raise SystemExit, 0
+    else:
+        host = arguments[0]
+
     # Verify that key pairs are present on the local side 
     print "Checking your local configuration..."
     try:
@@ -698,7 +701,7 @@ if __name__ == '__main__':
         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.")
-        die("This probabably means $HOME is incorrect.")
+        die("This probably means $HOME is incorrect.")
     if not os.path.exists(".ssh"):
         print "You have no .ssh directory."
         if check: