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:
-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:
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
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__']
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
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:
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: