From c2177bd2c00fecbc608e54fb8fc00b5114b1b249 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 3 Dec 2003 22:58:22 +0000 Subject: [PATCH] Not quite read to ship. --- ssh-installkeys | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/ssh-installkeys b/ssh-installkeys index 057a32a..7c31d13 100755 --- a/ssh-installkeys +++ b/ssh-installkeys @@ -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 """ # 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: -- 2.43.0