diff -ru openssh-3.5p1.orig/TODO openssh-3.5p1/TODO
--- openssh-3.5p1.orig/TODO	2002-09-05 16:32:03.000000000 +1000
+++ openssh-3.5p1/TODO	2003-03-12 21:10:26.000000000 +1100
@@ -15,8 +15,6 @@
 
 - Replacement for setproctitle() - HP-UX support only currently
 
-- Handle changing passwords for the non-PAM expired password case
-
 - Improve PAM support (a pam_lastlog module will cause sshd to exit)
   and maybe support alternate forms of authentications like OPIE via
   pam?
diff -ru openssh-3.5p1.orig/acconfig.h openssh-3.5p1/acconfig.h
--- openssh-3.5p1.orig/acconfig.h	2002-09-26 10:38:48.000000000 +1000
+++ openssh-3.5p1/acconfig.h	2003-03-12 21:10:26.000000000 +1100
@@ -25,6 +25,9 @@
 /* from environment and PATH */
 #undef LOGIN_PROGRAM_FALLBACK
 
+/* Path to passwd program */
+#undef PASSWD_PROGRAM_PATH
+
 /* Define if your password has a pw_class field */
 #undef HAVE_PW_CLASS_IN_PASSWD
 
diff -ru openssh-3.5p1.orig/auth-pam.c openssh-3.5p1/auth-pam.c
--- openssh-3.5p1.orig/auth-pam.c	2002-07-29 06:24:08.000000000 +1000
+++ openssh-3.5p1/auth-pam.c	2003-03-12 21:10:26.000000000 +1100
@@ -42,8 +42,6 @@
 
 #define NEW_AUTHTOK_MSG \
 	"Warning: Your password has expired, please change it now."
-#define NEW_AUTHTOK_MSG_PRIVSEP \
-	"Your password has expired, the session cannot proceed."
 
 static int do_pam_conversation(int num_msg, const struct pam_message **msg,
 	struct pam_response **resp, void *appdata_ptr);
@@ -60,7 +58,7 @@
 /* states for do_pam_conversation() */
 enum { INITIAL_LOGIN, OTHER } pamstate = INITIAL_LOGIN;
 /* remember whether pam_acct_mgmt() returned PAM_NEW_AUTHTOK_REQD */
-static int password_change_required = 0;
+extern int password_change_required;
 /* remember whether the last pam_authenticate() succeeded or not */
 static int was_authenticated = 0;
 
@@ -256,18 +254,10 @@
 		case PAM_SUCCESS:
 			/* This is what we want */
 			break;
-#if 0
 		case PAM_NEW_AUTHTOK_REQD:
-			message_cat(&__pam_msg, use_privsep ?
-			    NEW_AUTHTOK_MSG_PRIVSEP : NEW_AUTHTOK_MSG);
-			/* flag that password change is necessary */
-			password_change_required = 1;
-			/* disallow other functionality for now */
-			no_port_forwarding_flag |= 2;
-			no_agent_forwarding_flag |= 2;
-			no_x11_forwarding_flag |= 2;
+			message_cat(&__pam_msg, NEW_AUTHTOK_MSG);
+			flag_password_change_required();
 			break;
-#endif
 		default:
 			log("PAM rejected by account configuration[%d]: "
 			    "%.200s", pam_retval, PAM_STRERROR(__pamh, 
@@ -353,13 +343,7 @@
 			fatal("PAM pam_chauthtok failed[%d]: %.200s",
 			    pam_retval, PAM_STRERROR(__pamh, pam_retval));
 #if 0
-		/* XXX: This would need to be done in the parent process,
-		 * but there's currently no way to pass such request. */
-		no_port_forwarding_flag &= ~2;
-		no_agent_forwarding_flag &= ~2;
-		no_x11_forwarding_flag &= ~2;
-		if (!no_port_forwarding_flag && options.allow_tcp_forwarding)
-			channel_permit_all_opens();
+		flag_password_change_successful();
 #endif
 	}
 }
diff -ru openssh-3.5p1.orig/auth-passwd.c openssh-3.5p1/auth-passwd.c
--- openssh-3.5p1.orig/auth-passwd.c	2002-09-26 09:14:16.000000000 +1000
+++ openssh-3.5p1/auth-passwd.c	2003-03-12 21:14:41.000000000 +1100
@@ -42,6 +42,10 @@
 #include "log.h"
 #include "servconf.h"
 #include "auth.h"
+#include "buffer.h"
+#include "misc.h"
+#include "channels.h"
+#include "auth-options.h"
 
 #if !defined(USE_PAM) && !defined(HAVE_OSF_SIA)
 /* Don't need any of these headers for the PAM or SIA cases */
@@ -81,9 +85,9 @@
 #endif /* !USE_PAM && !HAVE_OSF_SIA */
 
 extern ServerOptions options;
-#ifdef WITH_AIXAUTHENTICATE
-extern char *aixloginmsg;
-#endif
+
+int password_change_required = 0;
+pid_t password_change_pid;	/* pid used to reset forwarding flags */
 
 /*
  * Tries to authenticate the user using password.  Returns true if
@@ -149,15 +153,16 @@
 #endif
 #ifdef WITH_AIXAUTHENTICATE
 	authsuccess = (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0);
-
+	aix_remove_embedded_newlines(authmsg);
 	if (authsuccess)
-	        /* We don't have a pty yet, so just label the line as "ssh" */
-	        if (loginsuccess(authctxt->user,
-			get_canonical_hostname(options.verify_reverse_mapping),
-			"ssh", &aixloginmsg) < 0)
-				aixloginmsg = NULL;
-
-	return(authsuccess);
+		debug3("AIX/authenticate succeeded for user %s: %.100s",
+		    pw->pw_name, authmsg);
+	else
+		debug3("AIX/authenticate failed for user %s: %.100s",
+		    pw->pw_name, authmsg);
+	if (authmsg)
+		xfree(authmsg);
+	return authsuccess;
 #endif
 #ifdef KRB4
 	if (options.kerberos_authentication == 1) {
@@ -233,3 +238,78 @@
 	return (strcmp(encrypted_password, pw_password) == 0);
 #endif /* !USE_PAM && !HAVE_OSF_SIA */
 }
+
+/*
+ * Perform generic password change via tty. Like do_pam_chauthtok(),
+ * it throws a fatal error if the password can't be changed.
+ */
+int
+do_tty_change_password(struct passwd *pw)
+{
+	pid_t pid;
+	int status;
+	mysig_t old_signal;
+
+	old_signal = mysignal(SIGCHLD, SIG_DFL);
+
+	if ((pid = fork()) == -1)
+		fatal("Couldn't fork: %s", strerror(errno));
+
+	if (pid == 0) {
+		setuid(pw->pw_uid);
+		if (geteuid() == 0) 
+			execl(PASSWD_PROGRAM_PATH, "passwd", pw->pw_name,
+			    (char *)NULL);
+		else
+			execl(PASSWD_PROGRAM_PATH, "passwd", (char *)NULL);
+			
+		/* execl shouldn't return */
+		fatal("Couldn't exec %s", PASSWD_PROGRAM_PATH);
+		exit(1);
+	}
+
+	if (waitpid(pid, &status, 0) == -1)
+		fatal("Couldn't wait for child: %s", strerror(errno));
+	mysignal(SIGCHLD, old_signal);
+
+	if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
+		debug("%s password changed sucessfully", __func__);
+		flag_password_change_successful();
+		return 1;
+	} else {
+		fatal("Failed to change password for %s, passwd returned %d",
+		    pw->pw_name, status);
+		return 0;
+	}
+}
+
+/*
+ * flag that password change is necessary
+ */
+void
+flag_password_change_required(void)
+{
+	debug3("disabling forwarding");
+	password_change_required = 1;
+
+	/* disallow other functionality for now */
+	no_port_forwarding_flag |= 2;
+	no_agent_forwarding_flag |= 2;
+	no_x11_forwarding_flag |= 2;
+}
+
+/*
+ * password change successful
+ * XXX: must be done in parent, but currently there is no way to pass
+ * this request.
+ */
+void
+flag_password_change_successful(void)
+{
+	debug3("resetting forwarding flags");
+
+	password_change_required = 0;
+	no_port_forwarding_flag &= ~2;
+	no_agent_forwarding_flag &= ~2;
+	no_x11_forwarding_flag &= ~2;
+}
diff -ru openssh-3.5p1.orig/auth.c openssh-3.5p1/auth.c
--- openssh-3.5p1.orig/auth.c	2002-09-22 01:26:53.000000000 +1000
+++ openssh-3.5p1/auth.c	2003-03-12 21:15:06.000000000 +1100
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth.c,v 1.45 2002/09/20 18:41:29 stevesk Exp $");
+RCSID("$OpenBSD: auth.c,v 1.46 2002/11/04 10:07:53 markus Exp $");
 
 #ifdef HAVE_LOGIN_H
 #include <login.h>
@@ -36,6 +36,11 @@
 #include <libgen.h>
 #endif
 
+#ifdef WITH_AIXAUTHENTICATE
+#include <userpw.h>
+#include <usersec.h>
+#endif
+
 #include "xmalloc.h"
 #include "match.h"
 #include "groupaccess.h"
@@ -51,9 +56,12 @@
 #include "misc.h"
 #include "bufaux.h"
 #include "packet.h"
+#include "sshlogin.h"
 
 /* import */
 extern ServerOptions options;
+extern Buffer expire_message;
+extern Buffer login_message;
 
 /* Debugging messages */
 Buffer auth_debug;
@@ -75,51 +83,75 @@
 	const char *hostname = NULL, *ipaddr = NULL;
 	char *shell;
 	int i;
-#ifdef WITH_AIXAUTHENTICATE
-	char *loginmsg;
-#endif /* WITH_AIXAUTHENTICATE */
 #if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \
-	!defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
+    !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
 	struct spwd *spw;
+	time_t today;
+#endif
 
 	/* Shouldn't be called if pw is NULL, but better safe than sorry... */
 	if (!pw || !pw->pw_name)
 		return 0;
 
 #define	DAY		(24L * 60 * 60) /* 1 day in seconds */
-	spw = getspnam(pw->pw_name);
-	if (spw != NULL) {
-		time_t today = time(NULL) / DAY;
+#define WEEK		(DAY * 7)	/* 1 week in seconds */
+#if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \
+    !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
+	if ((spw = getspnam(pw->pw_name)) != NULL) {
+		int daysleft;
+
+		today = time(NULL) / DAY;
 		debug3("allowed_user: today %d sp_expire %d sp_lstchg %d"
-		    " sp_max %d", (int)today, (int)spw->sp_expire,
-		    (int)spw->sp_lstchg, (int)spw->sp_max);
+		    " sp_max %d sp_warn %d", (int)today, (int)spw->sp_expire,
+		    (int)spw->sp_lstchg, (int)spw->sp_max, (int)spw->sp_warn);
 
 		/*
 		 * We assume account and password expiration occurs the
 		 * day after the day specified.
 		 */
-		if (spw->sp_expire != -1 && today > spw->sp_expire) {
+		daysleft = spw->sp_expire - today;
+		if (spw->sp_expire == -1) {
+			debug3("account expiration disabled");
+		} else if (today > spw->sp_expire) {
 			log("Account %.100s has expired", pw->pw_name);
 			return 0;
-		}
+		} else if (daysleft <= spw->sp_warn) {
+			char buf[256];
 
+			debug3("account will expire in %d days", daysleft);
+			snprintf(buf, sizeof(buf),
+			    "Your account will expire in %d day%s.\n",
+			    daysleft, daysleft == 1 ? "" : "s");
+			buffer_append(&login_message, buf, strlen(buf));
+		}
+		
+#define PWCHG_FORCED    "You must change your password now.\n"
+#define PWCHG_EXPIRED   "Your password has expired, you must change it now.\n"
+		daysleft = spw->sp_lstchg + spw->sp_max - today;
 		if (spw->sp_lstchg == 0) {
 			log("User %.100s password has expired (root forced)",
 			    pw->pw_name);
-			return 0;
-		}
-
-		if (spw->sp_max != -1 &&
-		    today > spw->sp_lstchg + spw->sp_max) {
+			flag_password_change_required();
+			buffer_append(&expire_message, PWCHG_FORCED,
+			    sizeof(PWCHG_FORCED));
+		} else if (spw->sp_max == -1) {
+			debug3("password expiration disabled");
+		} else if (daysleft < 0) {
 			log("User %.100s password has expired (password aged)",
 			    pw->pw_name);
-			return 0;
+			flag_password_change_required();
+			buffer_append(&expire_message, PWCHG_EXPIRED,
+			    sizeof(PWCHG_EXPIRED));
+		} else if (daysleft <= spw->sp_warn) {
+			char buf[256];
+
+			debug3("password will expire in %d days", daysleft);
+			snprintf(buf, sizeof(buf),
+			    "Your password will expire in %d day%s.\n",
+			    daysleft, daysleft == 1 ? "" : "s");
+			buffer_append(&expire_message, buf, strlen(buf));
 		}
 	}
-#else
-	/* Shouldn't be called if pw is NULL, but better safe than sorry... */
-	if (!pw || !pw->pw_name)
-		return 0;
 #endif
 
 	/*
@@ -202,19 +234,80 @@
 	}
 
 #ifdef WITH_AIXAUTHENTICATE
-	if (loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &loginmsg) != 0) {
-		if (loginmsg && *loginmsg) {
-			/* Remove embedded newlines (if any) */
-			char *p;
-			for (p = loginmsg; *p; p++) {
-				if (*p == '\n')
-					*p = ' ';
+	/*
+	 * Don't check loginrestrictions() for root account (use
+	 * PermitRootLogin to control logins via ssh), or if running as
+	 * non-root user (since loginrestrictions will always fail).
+	 */
+	if ( (pw->pw_uid != 0) && (geteuid() == 0) ) {
+		int loginrestrict_errno = errno;
+		char *msg;
+
+		/* check for AIX account restrictions */
+		if (loginrestrictions(pw->pw_name, S_RLOGIN, NULL, &msg) != 0) {
+			if (msg && *msg) {
+				aix_remove_embedded_newlines(msg);
+				log("Login restricted for %s: %.100s",
+				    pw->pw_name, msg);
+				xfree(msg);
 			}
-			/* Remove trailing newline */
-			*--p = '\0';
-			log("Login restricted for %s: %.100s", pw->pw_name, loginmsg);
+
+			/* Don't fail if /etc/nologin  set */
+			if (!(loginrestrict_errno == EPERM &&
+			    stat(_PATH_NOLOGIN, &st) == 0))
+				return 0;
 		}
-		return 0;
+	}
+
+
+	/*
+	 * Check AIX password expiry.  Only check when running as root.
+	 * Unpriv'ed users can't access /etc/security/passwd or
+	 * /etc/security/user so passwdexpired will always fail.
+	 */
+	if (geteuid() == 0) {
+		char *msg;
+		int result, maxexpired;
+		struct userpw *upw;
+
+		/* check if password expired too long */
+		upw = getuserpw(pw->pw_name);
+		result = getuserattr(pw->pw_name, S_MAXEXPIRED, &maxexpired,
+		    SEC_INT);
+		if (upw != NULL && result == 0) {
+			debug3("%s lastupdate %lu maxexpired %d wks time %d",
+			    __func__, upw->upw_lastupdate, maxexpired,
+			    (int)time(NULL));
+			if (maxexpired != -1 && upw->upw_lastupdate +
+			    (maxexpired*WEEK) <= time(NULL) ){
+				log("User %.100s password expired too long",
+				    pw->pw_name);
+				return 0;
+			}
+		}
+
+		result = passwdexpired(pw->pw_name, &msg);
+		buffer_append(&expire_message, msg, strlen(msg));
+		if (msg && *msg)
+			aix_remove_embedded_newlines(msg);
+		debug3("AIX/passwdexpired returned %d msg %.100s", result, msg);
+
+		switch (result) {
+			case 0: /* success, password not expired */
+				break;
+			case 1: /* expired, password change required */
+				flag_password_change_required();
+				break;
+			default: /* user can't change(2) or other error (-1) */
+				log("Password can't be changed for user %s: "
+				    "%.100s", pw->pw_name, msg);
+				if (msg)
+					xfree(msg);
+				return 0;
+		}
+		if (msg)
+			xfree(msg);
+
 	}
 #endif /* WITH_AIXAUTHENTICATE */
 
@@ -230,6 +323,45 @@
 	return authctxt;
 }
 
+/*
+ * Generate last_login message and store for later display.  This must be
+ * called before login_login() is called and lastlog is updated.
+ */
+void
+generate_login_message(const char *user, uid_t uid, const char *host)
+{
+#ifdef WITH_AIXAUTHENTICATE
+	char *msg;
+
+	/* We don't have a pty yet, so just label the line as "ssh" */
+	if (loginsuccess(user, host, "ssh", &msg) >= 0)
+		buffer_append(&login_message, msg, strlen(msg));
+#elif !defined(NO_SSH_LASTLOG)
+	if (options.print_lastlog) {
+		char *time_string, lasthost[MAXHOSTNAMELEN], buf[256];
+		time_t last_login_time;
+
+		last_login_time = get_last_login_time(uid, user, lasthost,
+		   sizeof(lasthost));
+
+		if (last_login_time != 0) {
+		       time_string = ctime(&last_login_time);
+		       if (strchr(time_string, '\n'))
+			       *strchr(time_string, '\n') = 0;
+		       if (strcmp(lasthost, "") == 0)
+			       snprintf(buf, sizeof(buf),
+				   "Last login: %s\r\n",
+				   time_string);
+		       else
+			       snprintf(buf, sizeof(buf),
+				   "Last login: %s from %s\r\n",
+				   time_string, lasthost);
+		       buffer_append(&login_message, buf, strlen(buf));
+		}
+       }
+#endif
+}
+
 void
 auth_log(Authctxt *authctxt, int authenticated, char *method, char *info)
 {
@@ -257,6 +389,9 @@
 	    get_remote_port(),
 	    info);
 
+	if (authenticated && geteuid() == 0)
+		generate_login_message(authctxt->user, authctxt->pw->pw_uid,
+		    get_canonical_hostname(options.verify_reverse_mapping));
 #ifdef WITH_AIXAUTHENTICATE
 	if (authenticated == 0 && strcmp(method, "password") == 0)
 	    loginfailed(authctxt->user,
@@ -417,6 +552,7 @@
 	uid_t uid = pw->pw_uid;
 	char buf[MAXPATHLEN], homedir[MAXPATHLEN];
 	char *cp;
+	int comparehome = 0;
 	struct stat st;
 
 	if (realpath(file, buf) == NULL) {
@@ -424,11 +560,8 @@
 		    strerror(errno));
 		return -1;
 	}
-	if (realpath(pw->pw_dir, homedir) == NULL) {
-		snprintf(err, errlen, "realpath %s failed: %s", pw->pw_dir,
-		    strerror(errno));
-		return -1;
-	}
+	if (realpath(pw->pw_dir, homedir) != NULL)
+		comparehome = 1;
 
 	/* check the open file to avoid races */
 	if (fstat(fileno(f), &st) < 0 ||
@@ -457,7 +590,7 @@
 		}
 
 		/* If are passed the homedir then we can stop */
-		if (strcmp(homedir, buf) == 0) {
+		if (comparehome && strcmp(homedir, buf) == 0) {
 			debug3("secure_filename: terminating check at '%s'",
 			    buf);
 			break;
@@ -487,6 +620,11 @@
 	if (pw == NULL) {
 		log("Illegal user %.100s from %.100s",
 		    user, get_remote_ipaddr());
+#ifdef WITH_AIXAUTHENTICATE
+		loginfailed(user,
+		    get_canonical_hostname(options.verify_reverse_mapping),
+		    "ssh");
+#endif
 		return (NULL);
 	}
 	if (!allowed_user(pw))
diff -ru openssh-3.5p1.orig/auth.h openssh-3.5p1/auth.h
--- openssh-3.5p1.orig/auth.h	2002-09-27 13:26:01.000000000 +1000
+++ openssh-3.5p1/auth.h	2003-03-12 21:10:26.000000000 +1100
@@ -156,6 +156,9 @@
 
 int	allowed_user(struct passwd *);
 struct passwd * getpwnamallow(const char *user);
+int	do_tty_change_password(struct passwd *pw);
+void	flag_password_change_required(void);
+void	flag_password_change_successful(void);
 
 char	*get_challenge(Authctxt *);
 int	verify_response(Authctxt *, const char *);
diff -ru openssh-3.5p1.orig/config.h.in openssh-3.5p1/config.h.in
--- openssh-3.5p1.orig/config.h.in	2002-10-04 11:31:57.000000000 +1000
+++ openssh-3.5p1/config.h.in	2003-03-12 21:16:01.000000000 +1100
@@ -25,6 +25,9 @@
 /* from environment and PATH */
 #undef LOGIN_PROGRAM_FALLBACK
 
+/* Path to passwd program */
+#undef PASSWD_PROGRAM_PATH
+
 /* Define if your password has a pw_class field */
 #undef HAVE_PW_CLASS_IN_PASSWD
 
diff -ru openssh-3.5p1.orig/configure openssh-3.5p1/configure
--- openssh-3.5p1.orig/configure	2002-10-04 11:31:56.000000000 +1000
+++ openssh-3.5p1/configure	2003-03-12 21:15:58.000000000 +1100
@@ -3293,6 +3293,56 @@
 	fi
 fi
 
+# Extract the first word of "passwd", so it can be a program name with args.
+set dummy passwd; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PASSWD_PROGRAM_PATH+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PASSWD_PROGRAM_PATH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PASSWD_PROGRAM_PATH="$PASSWD_PROGRAM_PATH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PASSWD_PROGRAM_PATH="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PASSWD_PROGRAM_PATH=$ac_cv_path_PASSWD_PROGRAM_PATH
+
+if test -n "$PASSWD_PROGRAM_PATH"; then
+  echo "$as_me:$LINENO: result: $PASSWD_PROGRAM_PATH" >&5
+echo "${ECHO_T}$PASSWD_PROGRAM_PATH" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test ! -z "$PASSWD_PROGRAM_PATH" ; then
+	cat >>confdefs.h <<_ACEOF
+#define PASSWD_PROGRAM_PATH "$PASSWD_PROGRAM_PATH"
+_ACEOF
+
+else
+	{ { echo "$as_me:$LINENO: error: *** passwd command not found - check config.log ***" >&5
+echo "$as_me: error: *** passwd command not found - check config.log ***" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 if test -z "$LD" ; then
 	LD=$CC
 fi
@@ -17350,6 +17400,7 @@
 s,@TEST_MINUS_S_SH@,$TEST_MINUS_S_SH,;t t
 s,@SH@,$SH,;t t
 s,@LOGIN_PROGRAM_FALLBACK@,$LOGIN_PROGRAM_FALLBACK,;t t
+s,@PASSWD_PROGRAM_PATH@,$PASSWD_PROGRAM_PATH,;t t
 s,@LD@,$LD,;t t
 s,@LIBWRAP@,$LIBWRAP,;t t
 s,@LIBPAM@,$LIBPAM,;t t
diff -ru openssh-3.5p1.orig/configure.ac openssh-3.5p1/configure.ac
--- openssh-3.5p1.orig/configure.ac	2002-09-26 10:38:47.000000000 +1000
+++ openssh-3.5p1/configure.ac	2003-03-12 21:10:26.000000000 +1100
@@ -40,6 +40,13 @@
 	fi
 fi
 
+AC_PATH_PROG(PASSWD_PROGRAM_PATH, passwd)
+if test ! -z "$PASSWD_PROGRAM_PATH" ; then
+	AC_DEFINE_UNQUOTED(PASSWD_PROGRAM_PATH, "$PASSWD_PROGRAM_PATH")
+else
+	AC_MSG_ERROR([*** passwd command not found - check config.log ***])
+fi
+
 if test -z "$LD" ; then
 	LD=$CC
 fi
diff -ru openssh-3.5p1.orig/openbsd-compat/port-aix.c openssh-3.5p1/openbsd-compat/port-aix.c
--- openssh-3.5p1.orig/openbsd-compat/port-aix.c	2002-07-07 12:17:36.000000000 +1000
+++ openssh-3.5p1/openbsd-compat/port-aix.c	2003-03-12 21:10:26.000000000 +1100
@@ -52,5 +52,25 @@
 	xfree(cp);
 }
 
-#endif /* _AIX */
+#ifdef WITH_AIXAUTHENTICATE
+/*
+ * Remove embedded newlines in string (if any).
+ * Used before logging messages returned by AIX authentication functions
+ * so the message is logged on one line.
+ */
+void
+aix_remove_embedded_newlines(char *p)
+{
+	if (p == NULL)
+		return;
+
+	for (; *p; p++) {
+		if (*p == '\n')
+			*p = ' ';
+	}
+	/* Remove trailing newline */
+	*--p = '\0';
+}
+#endif /* WITH_AIXAUTHENTICATE */
 
+#endif /* _AIX */
diff -ru openssh-3.5p1.orig/openbsd-compat/port-aix.h openssh-3.5p1/openbsd-compat/port-aix.h
--- openssh-3.5p1.orig/openbsd-compat/port-aix.h	2002-07-07 12:17:36.000000000 +1000
+++ openssh-3.5p1/openbsd-compat/port-aix.h	2003-03-12 21:10:26.000000000 +1100
@@ -26,4 +26,5 @@
 
 #ifdef _AIX
 void aix_usrinfo(struct passwd *pw);
+void aix_remove_embedded_newlines(char *);
 #endif /* _AIX */
diff -ru openssh-3.5p1.orig/scp.0 openssh-3.5p1/scp.0
--- openssh-3.5p1.orig/scp.0	2002-10-04 11:31:43.000000000 +1000
+++ openssh-3.5p1/scp.0	2003-03-12 21:15:21.000000000 +1100
@@ -1,17 +1,17 @@
-SCP(1)                  System General Commands Manual                  SCP(1)
+SCP(1)                    BSD General Commands Manual                   SCP(1)
 
-NAME
-     scp - secure copy (remote file copy program)
+^[[1mNAME^[[0m
+     ^[[1mscp ^[[22m- secure copy (remote file copy program)
 
-SYNOPSIS
-     scp [-pqrvBC46] [-F ssh_config] [-S program] [-P port] [-c cipher]
-         [-i identity_file] [-o ssh_option] [[user@]host1:]file1 [...]
-         [[user@]host2:]file2
+^[[1mSYNOPSIS^[[0m
+     ^[[1mscp ^[[22m[^[[1m-pqrvBC46^[[22m] [^[[1m-F ^[[4m^[[22mssh_config^[[24m] [^[[1m-S ^[[4m^[[22mprogram^[[24m] [^[[1m-P ^[[4m^[[22mport^[[24m] [^[[1m-c ^[[4m^[[22mcipher^[[24m]
+         [^[[1m-i ^[[4m^[[22midentity_file^[[24m] [^[[1m-o ^[[4m^[[22mssh_option^[[24m] [[^[[4muser@^[[24m]^[[4mhost1^[[24m:]^[[4mfile1^[[24m [^[[4m...^[[24m]
+         [[^[[4muser@^[[24m]^[[4mhost2^[[24m:]^[[4mfile2^[[0m
 
-DESCRIPTION
-     scp copies files between hosts on a network.  It uses ssh(1) for data
+^[[1mDESCRIPTION^[[0m
+     ^[[1mscp ^[[22mcopies files between hosts on a network.  It uses ssh(1) for data
      transfer, and uses the same authentication and provides the same security
-     as ssh(1).  Unlike rcp(1), scp will ask for passwords or passphrases if
+     as ssh(1).  Unlike rcp(1), ^[[1mscp ^[[22mwill ask for passwords or passphrases if
      they are needed for authentication.
 
      Any file name may contain a host and user specification to indicate that
@@ -20,68 +20,68 @@
 
      The options are as follows:
 
-     -c cipher
+     ^[[1m-c ^[[4m^[[22mcipher^[[0m
              Selects the cipher to use for encrypting the data transfer.  This
              option is directly passed to ssh(1).
 
-     -i identity_file
+     ^[[1m-i ^[[4m^[[22midentity_file^[[0m
              Selects the file from which the identity (private key) for RSA
              authentication is read.  This option is directly passed to
              ssh(1).
 
-     -p      Preserves modification times, access times, and modes from the
+     ^[[1m-p      ^[[22mPreserves modification times, access times, and modes from the
              original file.
 
-     -r      Recursively copy entire directories.
+     ^[[1m-r      ^[[22mRecursively copy entire directories.
 
-     -v      Verbose mode.  Causes scp and ssh(1) to print debugging messages
+     ^[[1m-v      ^[[22mVerbose mode.  Causes ^[[1mscp ^[[22mand ssh(1) to print debugging messages
              about their progress.  This is helpful in debugging connection,
              authentication, and configuration problems.
 
-     -B      Selects batch mode (prevents asking for passwords or
+     ^[[1m-B      ^[[22mSelects batch mode (prevents asking for passwords or
              passphrases).
 
-     -q      Disables the progress meter.
+     ^[[1m-q      ^[[22mDisables the progress meter.
 
-     -C      Compression enable.  Passes the -C flag to ssh(1) to enable comM--
+     ^[[1m-C      ^[[22mCompression enable.  Passes the ^[[1m-C ^[[22mflag to ssh(1) to enable com-
              pression.
 
-     -F ssh_config
-             Specifies an alternative per-user configuration file for ssh.
+     ^[[1m-F ^[[4m^[[22mssh_config^[[0m
+             Specifies an alternative per-user configuration file for ^[[1mssh^[[22m.
              This option is directly passed to ssh(1).
 
-     -P port
+     ^[[1m-P ^[[4m^[[22mport^[[0m
              Specifies the port to connect to on the remote host.  Note that
-             this option is written with a capital `P', because -p is already
+             this option is written with a capital `P', because ^[[1m-p ^[[22mis already
              reserved for preserving the times and modes of the file in
              rcp(1).
 
-     -S program
-             Name of program to use for the encrypted connection.  The program
+     ^[[1m-S ^[[4m^[[22mprogram^[[0m
+             Name of ^[[4mprogram^[[24m to use for the encrypted connection.  The program
              must understand ssh(1) options.
 
-     -o ssh_option
-             Can be used to pass options to ssh in the format used in
+     ^[[1m-o ^[[4m^[[22mssh_option^[[0m
+             Can be used to pass options to ^[[1mssh ^[[22min the format used in
              ssh_config(5).  This is useful for specifying options for which
-             there is no separate scp command-line flag.  For example, forcing
-             the use of protocol version 1 is specified using scp
-             -oProtocol=1.
+             there is no separate ^[[1mscp ^[[22mcommand-line flag.  For example, forcing
+             the use of protocol version 1 is specified using ^[[1mscp^[[0m
+             ^[[1m-oProtocol=1^[[22m.
 
-     -4      Forces scp to use IPv4 addresses only.
+     ^[[1m-4      ^[[22mForces ^[[1mscp ^[[22mto use IPv4 addresses only.
 
-     -6      Forces scp to use IPv6 addresses only.
+     ^[[1m-6      ^[[22mForces ^[[1mscp ^[[22mto use IPv6 addresses only.
 
-DIAGNOSTICS
-     scp exits with 0 on success or >0 if an error occurred.
+^[[1mDIAGNOSTICS^[[0m
+     ^[[1mscp ^[[22mexits with 0 on success or >0 if an error occurred.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      Timo Rinne <tri@iki.fi> and Tatu Ylonen <ylo@cs.hut.fi>
 
-HISTORY
-     scp is based on the rcp(1) program in BSD source code from the Regents of
+^[[1mHISTORY^[[0m
+     ^[[1mscp ^[[22mis based on the rcp(1) program in BSD source code from the Regents of
      the University of California.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
      ssh_config(5), sshd(8)
 
diff -ru openssh-3.5p1.orig/session.c openssh-3.5p1/session.c
--- openssh-3.5p1.orig/session.c	2002-09-26 10:38:50.000000000 +1000
+++ openssh-3.5p1/session.c	2003-03-12 21:10:26.000000000 +1100
@@ -95,6 +95,9 @@
 extern u_int utmp_len;
 extern int startup_pipe;
 extern void destroy_sensitive_data(void);
+extern Buffer expire_message;
+extern Buffer login_message;
+extern int password_change_required;
 
 /* original command from peer. */
 const char *original_command = NULL;
@@ -103,10 +106,6 @@
 #define MAX_SESSIONS 10
 Session	sessions[MAX_SESSIONS];
 
-#ifdef WITH_AIXAUTHENTICATE
-char *aixloginmsg;
-#endif /* WITH_AIXAUTHENTICATE */
-
 #ifdef HAVE_LOGIN_CAP
 login_cap_t *lc;
 #endif
@@ -456,10 +455,11 @@
 #if defined(USE_PAM)
 	do_pam_session(s->pw->pw_name, NULL);
 	do_pam_setcred(1);
-	if (is_pam_password_change_required())
+#endif /* USE_PAM */
+
+	if (password_change_required)
 		packet_disconnect("Password change required but no "
 		    "TTY available");
-#endif /* USE_PAM */
 
 	/* Fork the child. */
 	if ((pid = fork()) == 0) {
@@ -719,10 +719,10 @@
 void
 do_login(Session *s, const char *command)
 {
-	char *time_string;
 	socklen_t fromlen;
 	struct sockaddr_storage from;
 	struct passwd * pw = s->pw;
+	int password_changed = 0;
 	pid_t pid = getpid();
 
 	/*
@@ -746,16 +746,24 @@
 		    options.verify_reverse_mapping),
 		    (struct sockaddr *)&from, fromlen);
 
-#ifdef USE_PAM
 	/*
 	 * If password change is needed, do it now.
 	 * This needs to occur before the ~/.hushlogin check.
 	 */
-	if (is_pam_password_change_required()) {
+	buffer_append(&expire_message, "\0", 1);
+	if (password_change_required) {
+#ifdef USE_PAM
 		print_pam_messages();
-		do_pam_chauthtok();
-	}
+		if (use_privsep)
+			do_pam_chauthtok();
+		else
+			do_tty_change_password(pw);
+#else
+		printf("%s", (char *)buffer_ptr(&expire_message));
+		do_tty_change_password(pw);
 #endif
+		password_changed = 1;
+	}
 
 	if (check_quietlogin(s, command))
 		return;
@@ -763,24 +771,14 @@
 #ifdef USE_PAM
 	if (!is_pam_password_change_required())
 		print_pam_messages();
+#else
+	if (!password_changed)
+		printf("%s", (char *)buffer_ptr(&expire_message));
 #endif /* USE_PAM */
-#ifdef WITH_AIXAUTHENTICATE
-	if (aixloginmsg && *aixloginmsg)
-		printf("%s\n", aixloginmsg);
-#endif /* WITH_AIXAUTHENTICATE */
-
-#ifndef NO_SSH_LASTLOG
-	if (options.print_lastlog && s->last_login_time != 0) {
-		time_string = ctime(&s->last_login_time);
-		if (strchr(time_string, '\n'))
-			*strchr(time_string, '\n') = 0;
-		if (strcmp(s->hostname, "") == 0)
-			printf("Last login: %s\r\n", time_string);
-		else
-			printf("Last login: %s from %s\r\n", time_string,
-			    s->hostname);
-	}
-#endif /* NO_SSH_LASTLOG */
+
+	/* display post-login message */
+	buffer_append(&login_message, "\0", 1);
+	printf("%s", (char *)buffer_ptr(&login_message));
 
 	do_motd();
 }
@@ -1584,12 +1582,6 @@
 		packet_disconnect("Protocol error: you already have a pty.");
 		return 0;
 	}
-	/* Get the time and hostname when the user last logged in. */
-	if (options.print_lastlog) {
-		s->hostname[0] = '\0';
-		s->last_login_time = get_last_login_time(s->pw->pw_uid,
-		    s->pw->pw_name, s->hostname, sizeof(s->hostname));
-	}
 
 	s->term = packet_get_string(&len);
 
diff -ru openssh-3.5p1.orig/session.h openssh-3.5p1/session.h
--- openssh-3.5p1.orig/session.h	2002-07-04 10:14:18.000000000 +1000
+++ openssh-3.5p1/session.h	2003-03-12 21:10:26.000000000 +1100
@@ -39,9 +39,6 @@
 	int	ptyfd, ttyfd, ptymaster;
 	u_int	row, col, xpixel, ypixel;
 	char	tty[TTYSZ];
-	/* last login */
-	char	hostname[MAXHOSTNAMELEN];
-	time_t	last_login_time;
 	/* X11 */
 	u_int	display_number;
 	char	*display;
diff -ru openssh-3.5p1.orig/sftp-server.0 openssh-3.5p1/sftp-server.0
--- openssh-3.5p1.orig/sftp-server.0	2002-10-04 11:31:45.000000000 +1000
+++ openssh-3.5p1/sftp-server.0	2003-03-12 21:15:26.000000000 +1100
@@ -1,27 +1,27 @@
-SFTP-SERVER(8)              System Manager's Manual             SFTP-SERVER(8)
+SFTP-SERVER(8)            BSD System Manager's Manual           SFTP-SERVER(8)
 
-NAME
-     sftp-server - SFTP server subsystem
+^[[1mNAME^[[0m
+     ^[[1msftp-server ^[[22m- SFTP server subsystem
 
-SYNOPSIS
-     sftp-server
+^[[1mSYNOPSIS^[[0m
+     ^[[1msftp-server^[[0m
 
-DESCRIPTION
-     sftp-server is a program that speaks the server side of SFTP protocol to
-     stdout and expects client requests from stdin.  sftp-server is not
-     intended to be called directly, but from sshd(8) using the Subsystem
+^[[1mDESCRIPTION^[[0m
+     ^[[1msftp-server ^[[22mis a program that speaks the server side of SFTP protocol to
+     stdout and expects client requests from stdin.  ^[[1msftp-server ^[[22mis not
+     intended to be called directly, but from sshd(8) using the ^[[1mSubsystem^[[0m
      option.  See sshd(8) for more information.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      sftp(1), ssh(1), sshd(8)
 
-     T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-
+     T. Ylonen and S. Lehtinen, ^[[4mSSH^[[24m ^[[4mFile^[[24m ^[[4mTransfer^[[24m ^[[4mProtocol^[[24m, draft-ietf-secsh-
      filexfer-00.txt, January 2001, work in progress material.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      Markus Friedl <markus@openbsd.org>
 
-HISTORY
-     sftp-server first appeared in OpenBSD 2.8 .
+^[[1mHISTORY^[[0m
+     ^[[1msftp-server ^[[22mfirst appeared in OpenBSD 2.8 .
 
 BSD                             August 30, 2000                            BSD
diff -ru openssh-3.5p1.orig/sftp.0 openssh-3.5p1/sftp.0
--- openssh-3.5p1.orig/sftp.0	2002-10-04 11:31:46.000000000 +1000
+++ openssh-3.5p1/sftp.0	2003-03-12 21:15:26.000000000 +1100
@@ -1,171 +1,171 @@
-SFTP(1)                 System General Commands Manual                 SFTP(1)
+SFTP(1)                   BSD General Commands Manual                  SFTP(1)
 
-NAME
-     sftp - Secure file transfer program
+^[[1mNAME^[[0m
+     ^[[1msftp ^[[22m- Secure file transfer program
 
-SYNOPSIS
-     sftp [-vC1] [-b batchfile] [-o ssh_option] [-s subsystem | sftp_server]
-          [-B buffer_size] [-F ssh_config] [-P sftp_server path]
-          [-R num_requests] [-S program] host
-     sftp [[user@]host[:file [file]]]
-     sftp [[user@]host[:dir[/]]]
+^[[1mSYNOPSIS^[[0m
+     ^[[1msftp ^[[22m[^[[1m-vC1^[[22m] [^[[1m-b ^[[4m^[[22mbatchfile^[[24m] [^[[1m-o ^[[4m^[[22mssh_option^[[24m] [^[[1m-s ^[[4m^[[22msubsystem^[[24m | ^[[4msftp_server^[[24m]
+          [^[[1m-B ^[[4m^[[22mbuffer_size^[[24m] [^[[1m-F ^[[4m^[[22mssh_config^[[24m] [^[[1m-P ^[[4m^[[22msftp_server^[[24m ^[[4mpath^[[24m]
+          [^[[1m-R ^[[4m^[[22mnum_requests^[[24m] [^[[1m-S ^[[4m^[[22mprogram^[[24m] ^[[4mhost^[[0m
+     ^[[1msftp ^[[22m[[^[[4muser^[[24m@]^[[4mhost^[[24m[:^[[4mfile^[[24m [^[[4mfile^[[24m]]]
+     ^[[1msftp ^[[22m[[^[[4muser^[[24m@]^[[4mhost^[[24m[:^[[4mdir^[[24m[^[[4m/^[[24m]]]
 
-DESCRIPTION
-     sftp is an interactive file transfer program, similar to ftp(1), which
+^[[1mDESCRIPTION^[[0m
+     ^[[1msftp ^[[22mis an interactive file transfer program, similar to ftp(1), which
      performs all operations over an encrypted ssh(1) transport.  It may also
-     use many features of ssh, such as public key authentication and compresM--
-     sion.  sftp connects and logs into the specified host, then enters an
+     use many features of ssh, such as public key authentication and compres-
+     sion.  ^[[1msftp ^[[22mconnects and logs into the specified ^[[4mhost^[[24m, then enters an
      interactive command mode.
 
-     The second usage format will retrieve files automatically if a non-interM--
-     active authentication method is used; otherwise it will do so after sucM--
+     The second usage format will retrieve files automatically if a non-inter-
+     active authentication method is used; otherwise it will do so after suc-
      cessful interactive authentication.
 
-     The last usage format allows the sftp client to start in a remote direcM--
+     The last usage format allows the sftp client to start in a remote direc-
      tory.
 
      The options are as follows:
 
-     -b batchfile
-             Batch mode reads a series of commands from an input batchfile
-             instead of stdin.  Since it lacks user interaction it should be
-             used in conjunction with non-interactive authentication.  sftp
-             will abort if any of the following commands fail: get, put,
-             rename, ln, rm, mkdir, chdir, lchdir and lmkdir.
+     ^[[1m-b ^[[4m^[[22mbatchfile^[[0m
+             Batch mode reads a series of commands from an input ^[[4mbatchfile^[[0m
+             instead of ^[[4mstdin^[[24m.  Since it lacks user interaction it should be
+             used in conjunction with non-interactive authentication.  ^[[1msftp^[[0m
+             will abort if any of the following commands fail: ^[[1mget^[[22m, ^[[1mput^[[22m,
+             ^[[1mrename^[[22m, ^[[1mln^[[22m, ^[[1mrm^[[22m, ^[[1mmkdir^[[22m, ^[[1mchdir^[[22m, ^[[1mlchdir ^[[22mand ^[[1mlmkdir^[[22m.
 
-     -o ssh_option
-             Can be used to pass options to ssh in the format used in
+     ^[[1m-o ^[[4m^[[22mssh_option^[[0m
+             Can be used to pass options to ^[[1mssh ^[[22min the format used in
              ssh_config(5).  This is useful for specifying options for which
-             there is no separate sftp command-line flag.  For example, to
-             specify an alternate port use: sftp -oPort=24.
+             there is no separate ^[[1msftp ^[[22mcommand-line flag.  For example, to
+             specify an alternate port use: ^[[1msftp -oPort=24^[[22m.
 
-     -s subsystem | sftp_server
+     ^[[1m-s ^[[4m^[[22msubsystem^[[24m | ^[[4msftp_server^[[0m
              Specifies the SSH2 subsystem or the path for an sftp server on
              the remote host.  A path is useful for using sftp over protocol
-             version 1, or when the remote sshd does not have an sftp subsysM--
+             version 1, or when the remote ^[[1msshd ^[[22mdoes not have an sftp subsys-
              tem configured.
 
-     -v      Raise logging level. This option is also passed to ssh.
+     ^[[1m-v      ^[[22mRaise logging level. This option is also passed to ssh.
 
-     -B buffer_size
-             Specify  the size of the buffer that sftp uses when transferring
+     ^[[1m-B ^[[4m^[[22mbuffer_size^[[0m
+             Specify  the size of the buffer that ^[[1msftp ^[[22muses when transferring
              files. Larger buffers require fewer round trips at the cost of
              higher memory consumption. The default is 32768 bytes.
 
-     -C      Enables compression (via ssh's -C flag).
+     ^[[1m-C      ^[[22mEnables compression (via ssh's ^[[1m-C ^[[22mflag).
 
-     -F ssh_config
-             Specifies an alternative per-user configuration file for ssh.
+     ^[[1m-F ^[[4m^[[22mssh_config^[[0m
+             Specifies an alternative per-user configuration file for ^[[1mssh^[[22m.
              This option is directly passed to ssh(1).
 
-     -P sftp_server path
-             Connect directly to a local sftp-server (rather than via ssh)
+     ^[[1m-P ^[[4m^[[22msftp_server^[[24m ^[[4mpath^[[0m
+             Connect directly to a local ^[[1msftp-server ^[[22m(rather than via ^[[1mssh^[[22m)
              This option may be useful in debugging the client and server.
 
-     -R num_requests
+     ^[[1m-R ^[[4m^[[22mnum_requests^[[0m
              Specify how many requests may be outstanding at any one time.
              Increasing this may slightly improve file transfer speed but will
              increase memory usage. The default is 16 outstanding requests.
 
-     -S program
-             Name of the program to use for the encrypted connection.  The
+     ^[[1m-S ^[[4m^[[22mprogram^[[0m
+             Name of the ^[[4mprogram^[[24m to use for the encrypted connection.  The
              program must understand ssh(1) options.
 
-     -1      Specify the use of protocol version 1.
+     ^[[1m-1      ^[[22mSpecify the use of protocol version 1.
 
-INTERACTIVE COMMANDS
-     Once in interactive mode, sftp understands a set of commands similar to
+^[[1mINTERACTIVE COMMANDS^[[0m
+     Once in interactive mode, ^[[1msftp ^[[22munderstands a set of commands similar to
      those of ftp(1).  Commands are case insensitive and pathnames may be
      enclosed in quotes if they contain spaces.
 
-     bye     Quit sftp.
+     ^[[1mbye     ^[[22mQuit sftp.
 
-     cd path
-             Change remote directory to path.
+     ^[[1mcd ^[[4m^[[22mpath^[[0m
+             Change remote directory to ^[[4mpath^[[24m.
 
-     lcd path
-             Change local directory to path.
+     ^[[1mlcd ^[[4m^[[22mpath^[[0m
+             Change local directory to ^[[4mpath^[[24m.
 
-     chgrp grp path
-             Change group of file path to grp.  grp must be a numeric GID.
+     ^[[1mchgrp ^[[4m^[[22mgrp^[[24m ^[[4mpath^[[0m
+             Change group of file ^[[4mpath^[[24m to ^[[4mgrp^[[24m.  ^[[4mgrp^[[24m must be a numeric GID.
 
-     chmod mode path
-             Change permissions of file path to mode.
+     ^[[1mchmod ^[[4m^[[22mmode^[[24m ^[[4mpath^[[0m
+             Change permissions of file ^[[4mpath^[[24m to ^[[4mmode^[[24m.
 
-     chown own path
-             Change owner of file path to own.  own must be a numeric UID.
+     ^[[1mchown ^[[4m^[[22mown^[[24m ^[[4mpath^[[0m
+             Change owner of file ^[[4mpath^[[24m to ^[[4mown^[[24m.  ^[[4mown^[[24m must be a numeric UID.
 
-     exit    Quit sftp.
+     ^[[1mexit    ^[[22mQuit sftp.
 
-     get [flags] remote-path [local-path]
-             Retrieve the remote-path and store it on the local machine.  If
+     ^[[1mget ^[[22m[^[[4mflags^[[24m] ^[[4mremote-path^[[24m [^[[4mlocal-path^[[24m]
+             Retrieve the ^[[4mremote-path^[[24m and store it on the local machine.  If
              the local path name is not specified, it is given the same name
-             it has on the remote machine. If the -P flag is specified, then
+             it has on the remote machine. If the ^[[1m-P ^[[22mflag is specified, then
              the file's full permission and access time are copied too.
 
-     help    Display help text.
+     ^[[1mhelp    ^[[22mDisplay help text.
 
-     lls [ls-options [path]]
-             Display local directory listing of either path or current direcM--
-             tory if path is not specified.
+     ^[[1mlls ^[[22m[^[[4mls-options^[[24m [^[[4mpath^[[24m]]
+             Display local directory listing of either ^[[4mpath^[[24m or current direc-
+             tory if ^[[4mpath^[[24m is not specified.
 
-     lmkdir path
-             Create local directory specified by path.
+     ^[[1mlmkdir ^[[4m^[[22mpath^[[0m
+             Create local directory specified by ^[[4mpath^[[24m.
 
-     ln oldpath newpath
-             Create a symbolic link from oldpath to newpath.
+     ^[[1mln ^[[4m^[[22moldpath^[[24m ^[[4mnewpath^[[0m
+             Create a symbolic link from ^[[4moldpath^[[24m to ^[[4mnewpath^[[24m.
 
-     lpwd    Print local working directory.
+     ^[[1mlpwd    ^[[22mPrint local working directory.
 
-     ls [flags] [path]
-             Display remote directory listing of either path or current direcM--
-             tory if path is not specified. If the -l flag is specified, then
+     ^[[1mls ^[[22m[^[[4mflags^[[24m] [^[[4mpath^[[24m]
+             Display remote directory listing of either ^[[4mpath^[[24m or current direc-
+             tory if ^[[4mpath^[[24m is not specified. If the ^[[1m-l ^[[22mflag is specified, then
              display additional details including permissions and ownership
              information.
 
-     lumask umask
-             Set local umask to umask.
+     ^[[1mlumask ^[[4m^[[22mumask^[[0m
+             Set local umask to ^[[4mumask^[[24m.
 
-     mkdir path
-             Create remote directory specified by path.
+     ^[[1mmkdir ^[[4m^[[22mpath^[[0m
+             Create remote directory specified by ^[[4mpath^[[24m.
 
-     put [flags] local-path [local-path]
-             Upload local-path and store it on the remote machine. If the
+     ^[[1mput ^[[22m[^[[4mflags^[[24m] ^[[4mlocal-path^[[24m [^[[4mlocal-path^[[24m]
+             Upload ^[[4mlocal-path^[[24m and store it on the remote machine. If the
              remote path name is not specified, it is given the same name it
-             has on the local machine. If the -P flag is specified, then the
+             has on the local machine. If the ^[[1m-P ^[[22mflag is specified, then the
              file's full permission and access time are copied too.
 
-     pwd     Display remote working directory.
+     ^[[1mpwd     ^[[22mDisplay remote working directory.
 
-     quit    Quit sftp.
+     ^[[1mquit    ^[[22mQuit sftp.
 
-     rename oldpath newpath
-             Rename remote file from oldpath to newpath.
+     ^[[1mrename ^[[4m^[[22moldpath^[[24m ^[[4mnewpath^[[0m
+             Rename remote file from ^[[4moldpath^[[24m to ^[[4mnewpath^[[24m.
 
-     rmdir path
-             Remove remote directory specified by path.
+     ^[[1mrmdir ^[[4m^[[22mpath^[[0m
+             Remove remote directory specified by ^[[4mpath^[[24m.
 
-     rm path
-             Delete remote file specified by path.
+     ^[[1mrm ^[[4m^[[22mpath^[[0m
+             Delete remote file specified by ^[[4mpath^[[24m.
 
-     symlink oldpath newpath
-             Create a symbolic link from oldpath to newpath.
+     ^[[1msymlink ^[[4m^[[22moldpath^[[24m ^[[4mnewpath^[[0m
+             Create a symbolic link from ^[[4moldpath^[[24m to ^[[4mnewpath^[[24m.
 
-     ! command
-             Execute command in local shell.
+     ! ^[[4mcommand^[[0m
+             Execute ^[[4mcommand^[[24m in local shell.
 
      !       Escape to local shell.
 
      ?       Synonym for help.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      Damien Miller <djm@mindrot.org>
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      scp(1), ssh(1), ssh-add(1), ssh-keygen(1), ssh_config(5), sftp-server(8),
      sshd(8)
 
-     T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-
+     T. Ylonen and S. Lehtinen, ^[[4mSSH^[[24m ^[[4mFile^[[24m ^[[4mTransfer^[[24m ^[[4mProtocol^[[24m, draft-ietf-secsh-
      filexfer-00.txt, January 2001, work in progress material.
 
 BSD                            February 4, 2001                            BSD
diff -ru openssh-3.5p1.orig/ssh-add.0 openssh-3.5p1/ssh-add.0
--- openssh-3.5p1.orig/ssh-add.0	2002-10-04 11:31:44.000000000 +1000
+++ openssh-3.5p1/ssh-add.0	2003-03-12 21:15:22.000000000 +1100
@@ -1,54 +1,54 @@
-SSH-ADD(1)              System General Commands Manual              SSH-ADD(1)
+SSH-ADD(1)                BSD General Commands Manual               SSH-ADD(1)
 
-NAME
-     ssh-add - adds RSA or DSA identities to the authentication agent
+^[[1mNAME^[[0m
+     ^[[1mssh-add ^[[22m- adds RSA or DSA identities to the authentication agent
 
-SYNOPSIS
-     ssh-add [-lLdDxX] [-t life] [file ...]
-     ssh-add -s reader
-     ssh-add -e reader
+^[[1mSYNOPSIS^[[0m
+     ^[[1mssh-add ^[[22m[^[[1m-lLdDxX^[[22m] [^[[1m-t ^[[4m^[[22mlife^[[24m] [^[[4mfile^[[24m ^[[4m...^[[24m]
+     ^[[1mssh-add -s ^[[4m^[[22mreader^[[0m
+     ^[[1mssh-add -e ^[[4m^[[22mreader^[[0m
 
-DESCRIPTION
-     ssh-add adds RSA or DSA identities to the authentication agent,
+^[[1mDESCRIPTION^[[0m
+     ^[[1mssh-add ^[[22madds RSA or DSA identities to the authentication agent,
      ssh-agent(1).  When run without arguments, it adds the files
-     $HOME/.ssh/id_rsa, $HOME/.ssh/id_dsa and $HOME/.ssh/identity.  AlternaM--
+     ^[[4m$HOME/.ssh/id_rsa^[[24m, ^[[4m$HOME/.ssh/id_dsa^[[24m and ^[[4m$HOME/.ssh/identity^[[24m.  Alterna-
      tive file names can be given on the command line.  If any file requires a
-     passphrase, ssh-add asks for the passphrase from the user.  The
-     passphrase is read from the user's tty.  ssh-add retries the last
+     passphrase, ^[[1mssh-add ^[[22masks for the passphrase from the user.  The
+     passphrase is read from the user's tty.  ^[[1mssh-add ^[[22mretries the last
      passphrase if multiple identity files are given.
 
      The authentication agent must be running and must be an ancestor of the
-     current process for ssh-add to work.
+     current process for ^[[1mssh-add ^[[22mto work.
 
      The options are as follows:
 
-     -l      Lists fingerprints of all identities currently represented by the
+     ^[[1m-l      ^[[22mLists fingerprints of all identities currently represented by the
              agent.
 
-     -L      Lists public key parameters of all identities currently repreM--
+     ^[[1m-L      ^[[22mLists public key parameters of all identities currently repre-
              sented by the agent.
 
-     -d      Instead of adding the identity, removes the identity from the
+     ^[[1m-d      ^[[22mInstead of adding the identity, removes the identity from the
              agent.
 
-     -D      Deletes all identities from the agent.
+     ^[[1m-D      ^[[22mDeletes all identities from the agent.
 
-     -x      Lock the agent with a password.
+     ^[[1m-x      ^[[22mLock the agent with a password.
 
-     -X      Unlock the agent.
+     ^[[1m-X      ^[[22mUnlock the agent.
 
-     -t life
+     ^[[1m-t ^[[4m^[[22mlife^[[0m
              Set a maximum lifetime when adding identities to an agent.  The
-             lifetime may be specified in seconds or in a time format speciM--
+             lifetime may be specified in seconds or in a time format speci-
              fied in sshd(8).
 
-     -s reader
-             Add key in smartcard reader.
+     ^[[1m-s ^[[4m^[[22mreader^[[0m
+             Add key in smartcard ^[[4mreader^[[24m.
 
-     -e reader
-             Remove key in smartcard reader.
+     ^[[1m-e ^[[4m^[[22mreader^[[0m
+             Remove key in smartcard ^[[4mreader^[[24m.
 
-FILES
+^[[1mFILES^[[0m
      $HOME/.ssh/identity
              Contains the protocol version 1 RSA authentication identity of
              the user.
@@ -62,35 +62,35 @@
              the user.
 
      Identity files should not be readable by anyone but the user.  Note that
-     ssh-add ignores identity files if they are accessible by others.
+     ^[[1mssh-add ^[[22mignores identity files if they are accessible by others.
 
-ENVIRONMENT
+^[[1mENVIRONMENT^[[0m
      DISPLAY and SSH_ASKPASS
-             If ssh-add needs a passphrase, it will read the passphrase from
-             the current terminal if it was run from a terminal.  If ssh-add
+             If ^[[1mssh-add ^[[22mneeds a passphrase, it will read the passphrase from
+             the current terminal if it was run from a terminal.  If ^[[1mssh-add^[[0m
              does not have a terminal associated with it but DISPLAY and
              SSH_ASKPASS are set, it will execute the program specified by
              SSH_ASKPASS and open an X11 window to read the passphrase.  This
-             is particularly useful when calling ssh-add from a .Xsession or
+             is particularly useful when calling ^[[1mssh-add ^[[22mfrom a ^[[4m.Xsession^[[24m or
              related script.  (Note that on some machines it may be necessary
-             to redirect the input from /dev/null to make this work.)
+             to redirect the input from ^[[4m/dev/null^[[24m to make this work.)
 
      SSH_AUTH_SOCK
              Identifies the path of a unix-domain socket used to communicate
              with the agent.
 
-DIAGNOSTICS
+^[[1mDIAGNOSTICS^[[0m
      Exit status is 0 on success, 1 if the specified command fails, and 2 if
-     ssh-add is unable to contact the authentication agent.
+     ^[[1mssh-add ^[[22mis unable to contact the authentication agent.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      OpenSSH is a derivative of the original and free ssh 1.2.12 release by
      Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
-     de Raadt and Dug Song removed many bugs, re-added newer features and creM--
+     de Raadt and Dug Song removed many bugs, re-added newer features and cre-
      ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      ssh(1), ssh-agent(1), ssh-keygen(1), sshd(8)
 
 BSD                           September 25, 1999                           BSD
diff -ru openssh-3.5p1.orig/ssh-agent.0 openssh-3.5p1/ssh-agent.0
--- openssh-3.5p1.orig/ssh-agent.0	2002-10-04 11:31:44.000000000 +1000
+++ openssh-3.5p1/ssh-agent.0	2003-03-12 21:15:22.000000000 +1100
@@ -1,36 +1,36 @@
-SSH-AGENT(1)            System General Commands Manual            SSH-AGENT(1)
+SSH-AGENT(1)              BSD General Commands Manual             SSH-AGENT(1)
 
-NAME
-     ssh-agent - authentication agent
+^[[1mNAME^[[0m
+     ^[[1mssh-agent ^[[22m- authentication agent
 
-SYNOPSIS
-     ssh-agent [-a bind_address] [-c | -s] [-d] [command [args ...]]
-     ssh-agent [-c | -s] -k
-
-DESCRIPTION
-     ssh-agent is a program to hold private keys used for public key authentiM--
-     cation (RSA, DSA).  The idea is that ssh-agent is started in the beginM--
-     ning of an X-session or a login session, and all other windows or proM--
+^[[1mSYNOPSIS^[[0m
+     ^[[1mssh-agent ^[[22m[^[[1m-a ^[[4m^[[22mbind_address^[[24m] [^[[1m-c ^[[22m| ^[[1m-s^[[22m] [^[[1m-d^[[22m] [^[[4mcommand^[[24m [^[[4margs^[[24m ^[[4m...^[[24m]]
+     ^[[1mssh-agent ^[[22m[^[[1m-c ^[[22m| ^[[1m-s^[[22m] ^[[1m-k^[[0m
+
+^[[1mDESCRIPTION^[[0m
+     ^[[1mssh-agent ^[[22mis a program to hold private keys used for public key authenti-
+     cation (RSA, DSA).  The idea is that ^[[1mssh-agent ^[[22mis started in the begin-
+     ning of an X-session or a login session, and all other windows or pro-
      grams are started as clients to the ssh-agent program.  Through use of
      environment variables the agent can be located and automatically used for
      authentication when logging in to other machines using ssh(1).
 
      The options are as follows:
 
-     -a bind_address
-             Bind the agent to the unix-domain socket bind_address.  The
-             default is /tmp/ssh-XXXXXXXX/agent.<ppid>.
+     ^[[1m-a ^[[4m^[[22mbind_address^[[0m
+             Bind the agent to the unix-domain socket ^[[4mbind_address^[[24m.  The
+             default is ^[[4m/tmp/ssh-XXXXXXXX/agent.<ppid>^[[24m.
 
-     -c      Generate C-shell commands on stdout.  This is the default if
+     ^[[1m-c      ^[[22mGenerate C-shell commands on stdout.  This is the default if
              SHELL looks like it's a csh style of shell.
 
-     -s      Generate Bourne shell commands on stdout.  This is the default if
+     ^[[1m-s      ^[[22mGenerate Bourne shell commands on stdout.  This is the default if
              SHELL does not look like it's a csh style of shell.
 
-     -k      Kill the current agent (given by the SSH_AGENT_PID environment
+     ^[[1m-k      ^[[22mKill the current agent (given by the SSH_AGENT_PID environment
              variable).
 
-     -d      Debug mode.  When this option is specified ssh-agent will not
+     ^[[1m-d      ^[[22mDebug mode.  When this option is specified ^[[1mssh-agent ^[[22mwill not
              fork.
 
      If a commandline is given, this is executed as a subprocess of the agent.
@@ -38,19 +38,19 @@
 
      The agent initially does not have any private keys.  Keys are added using
      ssh-add(1).  When executed without arguments, ssh-add(1) adds the files
-     $HOME/.ssh/id_rsa, $HOME/.ssh/id_dsa and $HOME/.ssh/identity.  If the
+     ^[[4m$HOME/.ssh/id_rsa^[[24m, ^[[4m$HOME/.ssh/id_dsa^[[24m and ^[[4m$HOME/.ssh/identity^[[24m.  If the
      identity has a passphrase, ssh-add(1) asks for the passphrase (using a
-     small X11 application if running under X11, or from the terminal if runM--
-     ning without X).  It then sends the identity to the agent.  Several idenM--
+     small X11 application if running under X11, or from the terminal if run-
+     ning without X).  It then sends the identity to the agent.  Several iden-
      tities can be stored in the agent; the agent can automatically use any of
-     these identities.  ssh-add -l displays the identities currently held by
+     these identities.  ^[[1mssh-add -l ^[[22mdisplays the identities currently held by
      the agent.
 
-     The idea is that the agent is run in the user's local PC, laptop, or terM--
+     The idea is that the agent is run in the user's local PC, laptop, or ter-
      minal.  Authentication data need not be stored on any other machine, and
-     authentication passphrases never go over the network.  However, the conM--
+     authentication passphrases never go over the network.  However, the con-
      nection to the agent is forwarded over SSH remote logins, and the user
-     can thus use the privileges given by the identities anywhere in the netM--
+     can thus use the privileges given by the identities anywhere in the net-
      work in a secure way.
 
      There are two main ways to get an agent setup: Either the agent starts a
@@ -62,7 +62,7 @@
 
      The agent will never send a private key over its request channel.
      Instead, operations that require a private key will be performed by the
-     agent, and the result will be returned to the requester.  This way, priM--
+     agent, and the result will be returned to the requester.  This way, pri-
      vate keys are not exposed to clients using the agent.
 
      A unix-domain socket is created and the name of this socket is stored in
@@ -75,7 +75,7 @@
      The agent exits automatically when the command given on the command line
      terminates.
 
-FILES
+^[[1mFILES^[[0m
      $HOME/.ssh/identity
              Contains the protocol version 1 RSA authentication identity of
              the user.
@@ -89,19 +89,19 @@
              the user.
 
      /tmp/ssh-XXXXXXXX/agent.<ppid>
-             Unix-domain sockets used to contain the connection to the authenM--
+             Unix-domain sockets used to contain the connection to the authen-
              tication agent.  These sockets should only be readable by the
              owner.  The sockets should get automatically removed when the
              agent exits.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      OpenSSH is a derivative of the original and free ssh 1.2.12 release by
      Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
-     de Raadt and Dug Song removed many bugs, re-added newer features and creM--
+     de Raadt and Dug Song removed many bugs, re-added newer features and cre-
      ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      ssh(1), ssh-add(1), ssh-keygen(1), sshd(8)
 
 BSD                           September 25, 1999                           BSD
diff -ru openssh-3.5p1.orig/ssh-keygen.0 openssh-3.5p1/ssh-keygen.0
--- openssh-3.5p1.orig/ssh-keygen.0	2002-10-04 11:31:44.000000000 +1000
+++ openssh-3.5p1/ssh-keygen.0	2003-03-12 21:15:23.000000000 +1100
@@ -1,31 +1,31 @@
-SSH-KEYGEN(1)           System General Commands Manual           SSH-KEYGEN(1)
+SSH-KEYGEN(1)             BSD General Commands Manual            SSH-KEYGEN(1)
 
-NAME
-     ssh-keygen - authentication key generation, management and conversion
+^[[1mNAME^[[0m
+     ^[[1mssh-keygen ^[[22m- authentication key generation, management and conversion
 
-SYNOPSIS
-     ssh-keygen [-q] [-b bits] -t type [-N new_passphrase] [-C comment]
-                [-f output_keyfile]
-     ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
-     ssh-keygen -i [-f input_keyfile]
-     ssh-keygen -e [-f input_keyfile]
-     ssh-keygen -y [-f input_keyfile]
-     ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]
-     ssh-keygen -l [-f input_keyfile]
-     ssh-keygen -B [-f input_keyfile]
-     ssh-keygen -D reader
-     ssh-keygen -U reader [-f input_keyfile]
-
-DESCRIPTION
-     ssh-keygen generates, manages and converts authentication keys for
-     ssh(1).  ssh-keygen can create RSA keys for use by SSH protocol version 1
+^[[1mSYNOPSIS^[[0m
+     ^[[1mssh-keygen ^[[22m[^[[1m-q^[[22m] [^[[1m-b ^[[4m^[[22mbits^[[24m] ^[[1m-t ^[[4m^[[22mtype^[[24m [^[[1m-N ^[[4m^[[22mnew_passphrase^[[24m] [^[[1m-C ^[[4m^[[22mcomment^[[24m]
+                [^[[1m-f ^[[4m^[[22moutput_keyfile^[[24m]
+     ^[[1mssh-keygen -p ^[[22m[^[[1m-P ^[[4m^[[22mold_passphrase^[[24m] [^[[1m-N ^[[4m^[[22mnew_passphrase^[[24m] [^[[1m-f ^[[4m^[[22mkeyfile^[[24m]
+     ^[[1mssh-keygen -i ^[[22m[^[[1m-f ^[[4m^[[22minput_keyfile^[[24m]
+     ^[[1mssh-keygen -e ^[[22m[^[[1m-f ^[[4m^[[22minput_keyfile^[[24m]
+     ^[[1mssh-keygen -y ^[[22m[^[[1m-f ^[[4m^[[22minput_keyfile^[[24m]
+     ^[[1mssh-keygen -c ^[[22m[^[[1m-P ^[[4m^[[22mpassphrase^[[24m] [^[[1m-C ^[[4m^[[22mcomment^[[24m] [^[[1m-f ^[[4m^[[22mkeyfile^[[24m]
+     ^[[1mssh-keygen -l ^[[22m[^[[1m-f ^[[4m^[[22minput_keyfile^[[24m]
+     ^[[1mssh-keygen -B ^[[22m[^[[1m-f ^[[4m^[[22minput_keyfile^[[24m]
+     ^[[1mssh-keygen -D ^[[4m^[[22mreader^[[0m
+     ^[[1mssh-keygen -U ^[[4m^[[22mreader^[[24m [^[[1m-f ^[[4m^[[22minput_keyfile^[[24m]
+
+^[[1mDESCRIPTION^[[0m
+     ^[[1mssh-keygen ^[[22mgenerates, manages and converts authentication keys for
+     ssh(1).  ^[[1mssh-keygen ^[[22mcan create RSA keys for use by SSH protocol version 1
      and RSA or DSA keys for use by SSH protocol version 2. The type of key to
-     be generated is specified with the -t option.
+     be generated is specified with the ^[[1m-t ^[[22moption.
 
      Normally each user wishing to use SSH with RSA or DSA authentication runs
-     this once to create the authentication key in $HOME/.ssh/identity,
-     $HOME/.ssh/id_dsa or $HOME/.ssh/id_rsa.  Additionally, the system adminM--
-     istrator may use this to generate host keys, as seen in /etc/rc.
+     this once to create the authentication key in ^[[4m$HOME/.ssh/identity^[[24m,
+     ^[[4m$HOME/.ssh/id_dsa^[[24m or ^[[4m$HOME/.ssh/id_rsa^[[24m.  Additionally, the system admin-
+     istrator may use this to generate host keys, as seen in ^[[4m/etc/rc^[[24m.
 
      Normally this program generates the key and asks for a file in which to
      store the private key.  The public key is stored in a file with the same
@@ -33,13 +33,13 @@
      passphrase may be empty to indicate no passphrase (host keys must have an
      empty passphrase), or it may be a string of arbitrary length.  A
      passphrase is similar to a password, except it can be a phrase with a
-     series of words, punctuation, numbers, whitespace, or any string of charM--
+     series of words, punctuation, numbers, whitespace, or any string of char-
      acters you want.  Good passphrases are 10-30 characters long, are not
      simple sentences or otherwise easily guessable (English prose has only
      1-2 bits of entropy per character, and provides very bad passphrases),
      and contain a mix of upper and lowercase letters, numbers, and non-
      alphanumeric characters.  The passphrase can be changed later by using
-     the -p option.
+     the ^[[1m-p ^[[22moption.
 
      There is no way to recover a lost passphrase.  If the passphrase is lost
      or forgotten, a new key must be generated and copied to the corresponding
@@ -47,91 +47,91 @@
 
      For RSA1 keys, there is also a comment field in the key file that is only
      for convenience to the user to help identify the key.  The comment can
-     tell what the key is for, or whatever is useful.  The comment is initialM--
+     tell what the key is for, or whatever is useful.  The comment is initial-
      ized to ``user@host'' when the key is created, but can be changed using
-     the -c option.
+     the ^[[1m-c ^[[22moption.
 
      After a key is generated, instructions below detail where the keys should
      be placed to be activated.
 
      The options are as follows:
 
-     -b bits
+     ^[[1m-b ^[[4m^[[22mbits^[[0m
              Specifies the number of bits in the key to create.  Minimum is
              512 bits.  Generally 1024 bits is considered sufficient, and key
              sizes above that no longer improve security but make things
              slower.  The default is 1024 bits.
 
-     -c      Requests changing the comment in the private and public key
-             files.  This operation is only supported for RSA1 keys.  The proM--
+     ^[[1m-c      ^[[22mRequests changing the comment in the private and public key
+             files.  This operation is only supported for RSA1 keys.  The pro-
              gram will prompt for the file containing the private keys, for
              the passphrase if the key has one, and for the new comment.
 
-     -e      This option will read a private or public OpenSSH key file and
+     ^[[1m-e      ^[[22mThis option will read a private or public OpenSSH key file and
              print the key in a `SECSH Public Key File Format' to stdout.
              This option allows exporting keys for use by several commercial
              SSH implementations.
 
-     -f filename
+     ^[[1m-f ^[[4m^[[22mfilename^[[0m
              Specifies the filename of the key file.
 
-     -i      This option will read an unencrypted private (or public) key file
+     ^[[1m-i      ^[[22mThis option will read an unencrypted private (or public) key file
              in SSH2-compatible format and print an OpenSSH compatible private
-             (or public) key to stdout.  ssh-keygen also reads the `SECSH
+             (or public) key to stdout.  ^[[1mssh-keygen ^[[22malso reads the `SECSH
              Public Key File Format'.  This option allows importing keys from
              several commercial SSH implementations.
 
-     -l      Show fingerprint of specified public key file.  Private RSA1 keys
-             are also supported.  For RSA and DSA keys ssh-keygen tries to
+     ^[[1m-l      ^[[22mShow fingerprint of specified public key file.  Private RSA1 keys
+             are also supported.  For RSA and DSA keys ^[[1mssh-keygen ^[[22mtries to
              find the matching public key file and prints its fingerprint.
 
-     -p      Requests changing the passphrase of a private key file instead of
+     ^[[1m-p      ^[[22mRequests changing the passphrase of a private key file instead of
              creating a new private key.  The program will prompt for the file
              containing the private key, for the old passphrase, and twice for
              the new passphrase.
 
-     -q      Silence ssh-keygen.  Used by /etc/rc when creating a new key.
+     ^[[1m-q      ^[[22mSilence ^[[1mssh-keygen^[[22m.  Used by ^[[4m/etc/rc^[[24m when creating a new key.
 
-     -y      This option will read a private OpenSSH format file and print an
+     ^[[1m-y      ^[[22mThis option will read a private OpenSSH format file and print an
              OpenSSH public key to stdout.
 
-     -t type
+     ^[[1m-t ^[[4m^[[22mtype^[[0m
              Specifies the type of the key to create.  The possible values are
-             ``rsa1'' for protocol version 1 and ``rsa'' or ``dsa'' for protoM--
+             ``rsa1'' for protocol version 1 and ``rsa'' or ``dsa'' for proto-
              col version 2.
 
-     -B      Show the bubblebabble digest of specified private or public key
+     ^[[1m-B      ^[[22mShow the bubblebabble digest of specified private or public key
              file.
 
-     -C comment
+     ^[[1m-C ^[[4m^[[22mcomment^[[0m
              Provides the new comment.
 
-     -D reader
-             Download the RSA public key stored in the smartcard in reader.
+     ^[[1m-D ^[[4m^[[22mreader^[[0m
+             Download the RSA public key stored in the smartcard in ^[[4mreader^[[24m.
 
-     -N new_passphrase
+     ^[[1m-N ^[[4m^[[22mnew_passphrase^[[0m
              Provides the new passphrase.
 
-     -P passphrase
+     ^[[1m-P ^[[4m^[[22mpassphrase^[[0m
              Provides the (old) passphrase.
 
-     -U reader
-             Upload an existing RSA private key into the smartcard in reader.
+     ^[[1m-U ^[[4m^[[22mreader^[[0m
+             Upload an existing RSA private key into the smartcard in ^[[4mreader^[[24m.
 
-FILES
+^[[1mFILES^[[0m
      $HOME/.ssh/identity
              Contains the protocol version 1 RSA authentication identity of
              the user.  This file should not be readable by anyone but the
              user.  It is possible to specify a passphrase when generating the
              key; that passphrase will be used to encrypt the private part of
              this file using 3DES.  This file is not automatically accessed by
-             ssh-keygen but it is offered as the default file for the private
+             ^[[1mssh-keygen ^[[22mbut it is offered as the default file for the private
              key.  ssh(1) will read this file when a login attempt is made.
 
      $HOME/.ssh/identity.pub
-             Contains the protocol version 1 RSA public key for authenticaM--
+             Contains the protocol version 1 RSA public key for authentica-
              tion.  The contents of this file should be added to
-             $HOME/.ssh/authorized_keys on all machines where the user wishes
+             ^[[4m$HOME/.ssh/authorized_keys^[[24m on all machines where the user wishes
              to log in using RSA authentication.  There is no need to keep the
              contents of this file secret.
 
@@ -141,13 +141,13 @@
              user.  It is possible to specify a passphrase when generating the
              key; that passphrase will be used to encrypt the private part of
              this file using 3DES.  This file is not automatically accessed by
-             ssh-keygen but it is offered as the default file for the private
+             ^[[1mssh-keygen ^[[22mbut it is offered as the default file for the private
              key.  ssh(1) will read this file when a login attempt is made.
 
      $HOME/.ssh/id_dsa.pub
-             Contains the protocol version 2 DSA public key for authenticaM--
+             Contains the protocol version 2 DSA public key for authentica-
              tion.  The contents of this file should be added to
-             $HOME/.ssh/authorized_keys on all machines where the user wishes
+             ^[[4m$HOME/.ssh/authorized_keys^[[24m on all machines where the user wishes
              to log in using public key authentication.  There is no need to
              keep the contents of this file secret.
 
@@ -157,27 +157,27 @@
              user.  It is possible to specify a passphrase when generating the
              key; that passphrase will be used to encrypt the private part of
              this file using 3DES.  This file is not automatically accessed by
-             ssh-keygen but it is offered as the default file for the private
+             ^[[1mssh-keygen ^[[22mbut it is offered as the default file for the private
              key.  ssh(1) will read this file when a login attempt is made.
 
      $HOME/.ssh/id_rsa.pub
-             Contains the protocol version 2 RSA public key for authenticaM--
+             Contains the protocol version 2 RSA public key for authentica-
              tion.  The contents of this file should be added to
-             $HOME/.ssh/authorized_keys on all machines where the user wishes
+             ^[[4m$HOME/.ssh/authorized_keys^[[24m on all machines where the user wishes
              to log in using public key authentication.  There is no need to
              keep the contents of this file secret.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      OpenSSH is a derivative of the original and free ssh 1.2.12 release by
      Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
-     de Raadt and Dug Song removed many bugs, re-added newer features and creM--
+     de Raadt and Dug Song removed many bugs, re-added newer features and cre-
      ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      ssh(1), ssh-add(1), ssh-agent(1), sshd(8)
 
-     J. Galbraith and R. Thayer, SECSH Public Key File Format, draft-ietf-
+     J. Galbraith and R. Thayer, ^[[4mSECSH^[[24m ^[[4mPublic^[[24m ^[[4mKey^[[24m ^[[4mFile^[[24m ^[[4mFormat^[[24m, draft-ietf-
      secsh-publickeyfile-01.txt, March 2001, work in progress material.
 
 BSD                           September 25, 1999                           BSD
diff -ru openssh-3.5p1.orig/ssh-keyscan.0 openssh-3.5p1/ssh-keyscan.0
--- openssh-3.5p1.orig/ssh-keyscan.0	2002-10-04 11:31:44.000000000 +1000
+++ openssh-3.5p1/ssh-keyscan.0	2003-03-12 21:15:23.000000000 +1100
@@ -1,101 +1,101 @@
-SSH-KEYSCAN(1)          System General Commands Manual          SSH-KEYSCAN(1)
+SSH-KEYSCAN(1)            BSD General Commands Manual           SSH-KEYSCAN(1)
 
-NAME
-     ssh-keyscan - gather ssh public keys
+^[[1mNAME^[[0m
+     ^[[1mssh-keyscan ^[[22m- gather ssh public keys
 
-SYNOPSIS
-     ssh-keyscan [-v46] [-p port] [-T timeout] [-t type] [-f file]
-                 [host | addrlist namelist] [...]
+^[[1mSYNOPSIS^[[0m
+     ^[[1mssh-keyscan ^[[22m[^[[1m-v46^[[22m] [^[[1m-p ^[[4m^[[22mport^[[24m] [^[[1m-T ^[[4m^[[22mtimeout^[[24m] [^[[1m-t ^[[4m^[[22mtype^[[24m] [^[[1m-f ^[[4m^[[22mfile^[[24m]
+                 [^[[4mhost^[[24m | ^[[4maddrlist^[[24m ^[[4mnamelist^[[24m] [^[[4m...^[[24m]
 
-DESCRIPTION
-     ssh-keyscan is a utility for gathering the public ssh host keys of a numM--
+^[[1mDESCRIPTION^[[0m
+     ^[[1mssh-keyscan ^[[22mis a utility for gathering the public ssh host keys of a num-
      ber of hosts.  It was designed to aid in building and verifying
-     ssh_known_hosts files.  ssh-keyscan provides a minimal interface suitable
+     ^[[4mssh_known_hosts^[[24m files.  ^[[1mssh-keyscan ^[[22mprovides a minimal interface suitable
      for use by shell and perl scripts.
 
-     ssh-keyscan uses non-blocking socket I/O to contact as many hosts as posM--
+     ^[[1mssh-keyscan ^[[22muses non-blocking socket I/O to contact as many hosts as pos-
      sible in parallel, so it is very efficient.  The keys from a domain of
      1,000 hosts can be collected in tens of seconds, even when some of those
      hosts are down or do not run ssh.  For scanning, one does not need login
-     access to the machines that are being scanned, nor does the scanning proM--
+     access to the machines that are being scanned, nor does the scanning pro-
      cess involve any encryption.
 
      The options are as follows:
 
-     -p port
+     ^[[1m-p ^[[4m^[[22mport^[[0m
              Port to connect to on the remote host.
 
-     -T timeout
-             Set the timeout for connection attempts.  If timeout seconds have
+     ^[[1m-T ^[[4m^[[22mtimeout^[[0m
+             Set the timeout for connection attempts.  If ^[[4mtimeout^[[24m seconds have
              elapsed since a connection was initiated to a host or since the
              last time anything was read from that host, then the connection
              is closed and the host in question considered unavailable.
              Default is 5 seconds.
 
-     -t type
+     ^[[1m-t ^[[4m^[[22mtype^[[0m
              Specifies the type of the key to fetch from the scanned hosts.
              The possible values are ``rsa1'' for protocol version 1 and
              ``rsa'' or ``dsa'' for protocol version 2.  Multiple values may
              be specified by separating them with commas.  The default is
              ``rsa1''.
 
-     -f filename
-             Read hosts or addrlist namelist pairs from this file, one per
-             line.  If - is supplied instead of a filename, ssh-keyscan will
-             read hosts or addrlist namelist pairs from the standard input.
+     ^[[1m-f ^[[4m^[[22mfilename^[[0m
+             Read hosts or ^[[4maddrlist^[[24m ^[[4mnamelist^[[24m pairs from this file, one per
+             line.  If ^[[4m-^[[24m is supplied instead of a filename, ^[[1mssh-keyscan ^[[22mwill
+             read hosts or ^[[4maddrlist^[[24m ^[[4mnamelist^[[24m pairs from the standard input.
 
-     -v      Verbose mode.  Causes ssh-keyscan to print debugging messages
+     ^[[1m-v      ^[[22mVerbose mode.  Causes ^[[1mssh-keyscan ^[[22mto print debugging messages
              about its progress.
 
-     -4      Forces ssh-keyscan to use IPv4 addresses only.
+     ^[[1m-4      ^[[22mForces ^[[1mssh-keyscan ^[[22mto use IPv4 addresses only.
 
-     -6      Forces ssh-keyscan to use IPv6 addresses only.
+     ^[[1m-6      ^[[22mForces ^[[1mssh-keyscan ^[[22mto use IPv6 addresses only.
 
-SECURITY
-     If a ssh_known_hosts file is constructed using ssh-keyscan without veriM--
+^[[1mSECURITY^[[0m
+     If a ssh_known_hosts file is constructed using ^[[1mssh-keyscan ^[[22mwithout veri-
      fying the keys, users will be vulnerable to attacks.  On the other hand,
-     if the security model allows such a risk, ssh-keyscan can help in the
+     if the security model allows such a risk, ^[[1mssh-keyscan ^[[22mcan help in the
      detection of tampered keyfiles or man in the middle attacks which have
      begun after the ssh_known_hosts file was created.
 
-EXAMPLES
-     Print the rsa1 host key for machine hostname:
+^[[1mEXAMPLES^[[0m
+     Print the ^[[4mrsa1^[[24m host key for machine ^[[4mhostname^[[24m:
 
      $ ssh-keyscan hostname
 
-     Find all hosts from the file ssh_hosts which have new or different keys
-     from those in the sorted file ssh_known_hosts:
+     Find all hosts from the file ^[[4mssh_hosts^[[24m which have new or different keys
+     from those in the sorted file ^[[4mssh_known_hosts^[[24m:
 
      $ ssh-keyscan -t rsa,dsa -f ssh_hosts | \
              sort -u - ssh_known_hosts | diff ssh_known_hosts -
 
-FILES
-     Input format:
+^[[1mFILES^[[0m
+     ^[[4mInput^[[24m ^[[4mformat:^[[0m
 
      1.2.3.4,1.2.4.4 name.my.domain,name,n.my.domain,n,1.2.3.4,1.2.4.4
 
-     Output format for rsa1 keys:
+     ^[[4mOutput^[[24m ^[[4mformat^[[24m ^[[4mfor^[[24m ^[[4mrsa1^[[24m ^[[4mkeys:^[[0m
 
      host-or-namelist bits exponent modulus
 
-     Output format for rsa and dsa keys:
+     ^[[4mOutput^[[24m ^[[4mformat^[[24m ^[[4mfor^[[24m ^[[4mrsa^[[24m ^[[4mand^[[24m ^[[4mdsa^[[24m ^[[4mkeys:^[[0m
 
      host-or-namelist keytype base64-encoded-key
 
-     Where keytype is either ``ssh-rsa'' or ``ssh-dsa''.
+     Where ^[[4mkeytype^[[24m is either ``ssh-rsa'' or ``ssh-dsa''.
 
-     /etc/ssh/ssh_known_hosts
+     ^[[4m/etc/ssh/ssh_known_hosts^[[0m
 
-BUGS
+^[[1mBUGS^[[0m
      It generates "Connection closed by remote host" messages on the consoles
      of all the machines it scans if the server is older than version 2.9.
      This is because it opens a connection to the ssh port, reads the public
      key, and drops the connection as soon as it gets the key.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      ssh(1), sshd(8)
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      David Mazieres <dm@lcs.mit.edu> wrote the initial version, and Wayne
      Davison <wayned@users.sourceforge.net> added support for protocol version
      2.
diff -ru openssh-3.5p1.orig/ssh-keysign.0 openssh-3.5p1/ssh-keysign.0
--- openssh-3.5p1.orig/ssh-keysign.0	2002-10-04 11:31:46.000000000 +1000
+++ openssh-3.5p1/ssh-keysign.0	2003-03-12 21:15:27.000000000 +1100
@@ -1,42 +1,42 @@
-SSH-KEYSIGN(8)              System Manager's Manual             SSH-KEYSIGN(8)
+SSH-KEYSIGN(8)            BSD System Manager's Manual           SSH-KEYSIGN(8)
 
-NAME
-     ssh-keysign - ssh helper program for hostbased authentication
+^[[1mNAME^[[0m
+     ^[[1mssh-keysign ^[[22m- ssh helper program for hostbased authentication
 
-SYNOPSIS
-     ssh-keysign
+^[[1mSYNOPSIS^[[0m
+     ^[[1mssh-keysign^[[0m
 
-DESCRIPTION
-     ssh-keysign is used by ssh(1) to access the local host keys and generate
+^[[1mDESCRIPTION^[[0m
+     ^[[1mssh-keysign ^[[22mis used by ssh(1) to access the local host keys and generate
      the digital signature required during hostbased authentication with SSH
      protocol version 2.
 
-     ssh-keysign is disabled by default and can only be enabled in the the
-     global client configuration file /etc/ssh/ssh_config by setting
-     HostbasedAuthentication to ``yes''.
+     ^[[1mssh-keysign ^[[22mis disabled by default and can only be enabled in the the
+     global client configuration file ^[[4m/etc/ssh/ssh_config^[[24m by setting
+     ^[[1mHostbasedAuthentication ^[[22mto ``yes''.
 
-     ssh-keysign is not intended to be invoked by the user, but from ssh(1).
-     See ssh(1) and sshd(8) for more information about hostbased authenticaM--
+     ^[[1mssh-keysign ^[[22mis not intended to be invoked by the user, but from ssh(1).
+     See ssh(1) and sshd(8) for more information about hostbased authentica-
      tion.
 
-FILES
+^[[1mFILES^[[0m
      /etc/ssh/ssh_config
-             Controls whether ssh-keysign is enabled.
+             Controls whether ^[[1mssh-keysign ^[[22mis enabled.
 
      /etc/ssh/ssh_host_dsa_key, /etc/ssh/ssh_host_rsa_key
              These files contain the private parts of the host keys used to
              generate the digital signature.  They should be owned by root,
              readable only by root, and not accessible to others.  Since they
-             are readable only by root, ssh-keysign must be set-uid root if
+             are readable only by root, ^[[1mssh-keysign ^[[22mmust be set-uid root if
              hostbased authentication is used.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      ssh(1), ssh-keygen(1), ssh_config(5), sshd(8)
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      Markus Friedl <markus@openbsd.org>
 
-HISTORY
-     ssh-keysign first appeared in OpenBSD 3.2.
+^[[1mHISTORY^[[0m
+     ^[[1mssh-keysign ^[[22mfirst appeared in OpenBSD 3.2.
 
 BSD                              May 24, 2002                              BSD
diff -ru openssh-3.5p1.orig/ssh-rand-helper.0 openssh-3.5p1/ssh-rand-helper.0
--- openssh-3.5p1.orig/ssh-rand-helper.0	2002-10-04 11:31:46.000000000 +1000
+++ openssh-3.5p1/ssh-rand-helper.0	2003-03-12 21:15:27.000000000 +1100
@@ -1,49 +1,49 @@
-SSH-RAND-HELPER(8)          System Manager's Manual         SSH-RAND-HELPER(8)
+SSH-RAND-HELPER(8)        BSD System Manager's Manual       SSH-RAND-HELPER(8)
 
-NAME
-     ssh-rand-helper - Random number gatherer for OpenSSH
+^[[1mNAME^[[0m
+     ^[[1mssh-rand-helper ^[[22m- Random number gatherer for OpenSSH
 
-SYNOPSIS
-     ssh-rand-hlper [-vxXh] [-b bytes]
+^[[1mSYNOPSIS^[[0m
+     ^[[1mssh-rand-hlper ^[[22m[^[[1m-vxXh^[[22m] [^[[1m-b ^[[4m^[[22mbytes^[[24m]
 
-DESCRIPTION
-     ssh-rand-helper is a small helper program used by ssh(1), ssh-add(1),
+^[[1mDESCRIPTION^[[0m
+     ^[[1mssh-rand-helper ^[[22mis a small helper program used by ssh(1), ssh-add(1),
      ssh-agent(1), ssh-keygen(1), ssh-keyscan(1) and sshd(8) to gather random
      numbers of cryptographic quality if the openssl(4) library has not been
      configured to provide them itself.
 
-     Normally ssh-rand-helper will generate a strong random seed and provide
+     Normally ^[[1mssh-rand-helper ^[[22mwill generate a strong random seed and provide
      it to the calling program via standard output. If standard output is a
-     tty, ssh-rand-helper will instead print the seed in hexidecimal format
+     tty, ^[[1mssh-rand-helper ^[[22mwill instead print the seed in hexidecimal format
      unless told otherwise.
 
-     ssh-rand-helper will by default gather random numbers from the system
-     commands listed in /etc/ssh/ssh_prng_cmds.  The output of each of the
+     ^[[1mssh-rand-helper ^[[22mwill by default gather random numbers from the system
+     commands listed in ^[[4m/etc/ssh/ssh_prng_cmds^[[24m.  The output of each of the
      commands listed will be hashed and used to generate a random seed for the
-     calling program.  ssh-rand-helper will also store seed files in
-     ~/.ssh/prng_seed between executions.
+     calling program.  ^[[1mssh-rand-helper ^[[22mwill also store seed files in
+     ^[[4m~/.ssh/prng_seed^[[24m between executions.
 
-     Alternately, ssh-rand-helper may be configured at build time to collect
+     Alternately, ^[[1mssh-rand-helper ^[[22mmay be configured at build time to collect
      random numbers from a EGD/PRNGd server via a unix domain or localhost tcp
      socket.
 
-     This program is not intended to be run by the end-user, so the few comM--
+     This program is not intended to be run by the end-user, so the few com-
      mandline options are for debugging purposes only.
 
-     -b bytes
+     ^[[1m-b ^[[4m^[[22mbytes^[[0m
              Specify the number of random bytes to include in the output.
 
-     -x      Output a hexidecimal instead of a binary seed.
+     ^[[1m-x      ^[[22mOutput a hexidecimal instead of a binary seed.
 
-     -X      Force output of a binary seed, even if standard output is a tty
+     ^[[1m-X      ^[[22mForce output of a binary seed, even if standard output is a tty
 
-     -v      Turn on debugging message. Multiple -v options will increase the
-             debugging level.  -h Display a summary of options.
+     ^[[1m-v      ^[[22mTurn on debugging message. Multiple ^[[1m-v ^[[22moptions will increase the
+             debugging level.  ^[[1m-h ^[[22mDisplay a summary of options.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      Damien Miller <djm@mindrot.org>
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      ssh(1), ssh-add(1), ssh-keygen(1), sshd(8)
 
 BSD                             April 14, 2002                             BSD
diff -ru openssh-3.5p1.orig/ssh.0 openssh-3.5p1/ssh.0
--- openssh-3.5p1.orig/ssh.0	2002-10-04 11:31:45.000000000 +1000
+++ openssh-3.5p1/ssh.0	2003-03-12 21:15:24.000000000 +1100
@@ -1,100 +1,100 @@
-SSH(1)                  System General Commands Manual                  SSH(1)
+SSH(1)                    BSD General Commands Manual                   SSH(1)
 
-NAME
-     ssh - OpenSSH SSH client (remote login program)
+^[[1mNAME^[[0m
+     ^[[1mssh ^[[22m- OpenSSH SSH client (remote login program)
 
-SYNOPSIS
-     ssh [-l login_name] hostname | user@hostname [command]
+^[[1mSYNOPSIS^[[0m
+     ^[[1mssh ^[[22m[^[[1m-l ^[[4m^[[22mlogin_name^[[24m] ^[[4mhostname^[[24m | ^[[4muser@hostname^[[24m [^[[4mcommand^[[24m]
 
-     ssh [-afgknqstvxACNTX1246] [-b bind_address] [-c cipher_spec]
-         [-e escape_char] [-i identity_file] [-l login_name] [-m mac_spec]
-         [-o option] [-p port] [-F configfile] [-L port:host:hostport] [-R
-         port:host:hostport] [-D port] hostname | user@hostname [command]
+     ^[[1mssh ^[[22m[^[[1m-afgknqstvxACNTX1246^[[22m] [^[[1m-b ^[[4m^[[22mbind_address^[[24m] [^[[1m-c ^[[4m^[[22mcipher_spec^[[24m]
+         [^[[1m-e ^[[4m^[[22mescape_char^[[24m] [^[[1m-i ^[[4m^[[22midentity_file^[[24m] [^[[1m-l ^[[4m^[[22mlogin_name^[[24m] [^[[1m-m ^[[4m^[[22mmac_spec^[[24m]
+         [^[[1m-o ^[[4m^[[22moption^[[24m] [^[[1m-p ^[[4m^[[22mport^[[24m] [^[[1m-F ^[[4m^[[22mconfigfile^[[24m] [^[[1m-L ^[[4m^[[22mport^[[24m:^[[4mhost^[[24m:^[[4mhostport^[[24m] [^[[1m-R^[[0m
+         ^[[4mport^[[24m:^[[4mhost^[[24m:^[[4mhostport^[[24m] [^[[1m-D ^[[4m^[[22mport^[[24m] ^[[4mhostname^[[24m | ^[[4muser@hostname^[[24m [^[[4mcommand^[[24m]
 
-DESCRIPTION
-     ssh (SSH client) is a program for logging into a remote machine and for
+^[[1mDESCRIPTION^[[0m
+     ^[[1mssh ^[[22m(SSH client) is a program for logging into a remote machine and for
      executing commands on a remote machine.  It is intended to replace rlogin
      and rsh, and provide secure encrypted communications between two
      untrusted hosts over an insecure network.  X11 connections and arbitrary
      TCP/IP ports can also be forwarded over the secure channel.
 
-     ssh connects and logs into the specified hostname.  The user must prove
+     ^[[1mssh ^[[22mconnects and logs into the specified ^[[4mhostname^[[24m.  The user must prove
      his/her identity to the remote machine using one of several methods
      depending on the protocol version used:
 
-   SSH protocol version 1
+   ^[[1mSSH protocol version 1^[[0m
 
-     First, if the machine the user logs in from is listed in /etc/hosts.equiv
-     or /etc/shosts.equiv on the remote machine, and the user names are the
+     First, if the machine the user logs in from is listed in ^[[4m/etc/hosts.equiv^[[0m
+     or ^[[4m/etc/shosts.equiv^[[24m on the remote machine, and the user names are the
      same on both sides, the user is immediately permitted to log in.  Second,
-     if .rhosts or .shosts exists in the user's home directory on the remote
+     if ^[[4m.rhosts^[[24m or ^[[4m.shosts^[[24m exists in the user's home directory on the remote
      machine and contains a line containing the name of the client machine and
      the name of the user on that machine, the user is permitted to log in.
      This form of authentication alone is normally not allowed by the server
      because it is not secure.
 
-     The second authentication method is the rhosts or hosts.equiv method comM--
+     The second authentication method is the ^[[4mrhosts^[[24m or ^[[4mhosts.equiv^[[24m method com-
      bined with RSA-based host authentication.  It means that if the login
-     would be permitted by $HOME/.rhosts, $HOME/.shosts, /etc/hosts.equiv, or
-     /etc/shosts.equiv, and if additionally the server can verify the client's
-     host key (see /etc/ssh/ssh_known_hosts and $HOME/.ssh/known_hosts in the
-     FILES section), only then login is permitted.  This authentication method
-     closes security holes due to IP spoofing, DNS spoofing and routing spoofM--
-     ing.  [Note to the administrator: /etc/hosts.equiv, $HOME/.rhosts, and
+     would be permitted by ^[[4m$HOME/.rhosts^[[24m, ^[[4m$HOME/.shosts^[[24m, ^[[4m/etc/hosts.equiv^[[24m, or
+     ^[[4m/etc/shosts.equiv^[[24m, and if additionally the server can verify the client's
+     host key (see ^[[4m/etc/ssh/ssh_known_hosts^[[24m and ^[[4m$HOME/.ssh/known_hosts^[[24m in the
+     ^[[4mFILES^[[24m section), only then login is permitted.  This authentication method
+     closes security holes due to IP spoofing, DNS spoofing and routing spoof-
+     ing.  [Note to the administrator: ^[[4m/etc/hosts.equiv^[[24m, ^[[4m$HOME/.rhosts^[[24m, and
      the rlogin/rsh protocol in general, are inherently insecure and should be
      disabled if security is desired.]
 
-     As a third authentication method, ssh supports RSA based authentication.
+     As a third authentication method, ^[[1mssh ^[[22msupports RSA based authentication.
      The scheme is based on public-key cryptography: there are cryptosystems
      where encryption and decryption are done using separate keys, and it is
      not possible to derive the decryption key from the encryption key.  RSA
      is one such system.  The idea is that each user creates a public/private
      key pair for authentication purposes.  The server knows the public key,
      and only the user knows the private key.  The file
-     $HOME/.ssh/authorized_keys lists the public keys that are permitted for
-     logging in.  When the user logs in, the ssh program tells the server
+     ^[[4m$HOME/.ssh/authorized_keys^[[24m lists the public keys that are permitted for
+     logging in.  When the user logs in, the ^[[1mssh ^[[22mprogram tells the server
      which key pair it would like to use for authentication.  The server
      checks if this key is permitted, and if so, sends the user (actually the
-     ssh program running on behalf of the user) a challenge, a random number,
+     ^[[1mssh ^[[22mprogram running on behalf of the user) a challenge, a random number,
      encrypted by the user's public key.  The challenge can only be decrypted
-     using the proper private key.  The user's client then decrypts the chalM--
+     using the proper private key.  The user's client then decrypts the chal-
      lenge using the private key, proving that he/she knows the private key
      but without disclosing it to the server.
 
-     ssh implements the RSA authentication protocol automatically.  The user
+     ^[[1mssh ^[[22mimplements the RSA authentication protocol automatically.  The user
      creates his/her RSA key pair by running ssh-keygen(1).  This stores the
-     private key in $HOME/.ssh/identity and the public key in
-     $HOME/.ssh/identity.pub in the user's home directory.  The user should
-     then copy the identity.pub to $HOME/.ssh/authorized_keys in his/her home
-     directory on the remote machine (the authorized_keys file corresponds to
-     the conventional $HOME/.rhosts file, and has one key per line, though the
+     private key in ^[[4m$HOME/.ssh/identity^[[24m and the public key in
+     ^[[4m$HOME/.ssh/identity.pub^[[24m in the user's home directory.  The user should
+     then copy the ^[[4midentity.pub^[[24m to ^[[4m$HOME/.ssh/authorized_keys^[[24m in his/her home
+     directory on the remote machine (the ^[[4mauthorized_keys^[[24m file corresponds to
+     the conventional ^[[4m$HOME/.rhosts^[[24m file, and has one key per line, though the
      lines can be very long).  After this, the user can log in without giving
-     the password.  RSA authentication is much more secure than rhosts authenM--
+     the password.  RSA authentication is much more secure than rhosts authen-
      tication.
 
-     The most convenient way to use RSA authentication may be with an authenM--
+     The most convenient way to use RSA authentication may be with an authen-
      tication agent.  See ssh-agent(1) for more information.
 
-     If other authentication methods fail, ssh prompts the user for a passM--
+     If other authentication methods fail, ^[[1mssh ^[[22mprompts the user for a pass-
      word.  The password is sent to the remote host for checking; however,
      since all communications are encrypted, the password cannot be seen by
      someone listening on the network.
 
-   SSH protocol version 2
+   ^[[1mSSH protocol version 2^[[0m
 
      When a user connects using protocol version 2 similar authentication
      methods are available.  Using the default values for
-     PreferredAuthentications, the client will try to authenticate first using
+     ^[[1mPreferredAuthentications^[[22m, the client will try to authenticate first using
      the hostbased method; if this method fails public key authentication is
      attempted, and finally if this method fails keyboard-interactive and
      password authentication are tried.
 
      The public key method is similar to RSA authentication described in the
      previous section and allows the RSA or DSA algorithm to be used: The
-     client uses his private key, $HOME/.ssh/id_dsa or $HOME/.ssh/id_rsa, to
+     client uses his private key, ^[[4m$HOME/.ssh/id_dsa^[[24m or ^[[4m$HOME/.ssh/id_rsa^[[24m, to
      sign the session identifier and sends the result to the server.  The
      server checks whether the matching public key is listed in
-     $HOME/.ssh/authorized_keys and grants access if both the key is found and
+     ^[[4m$HOME/.ssh/authorized_keys^[[24m and grants access if both the key is found and
      the signature is correct.  The session identifier is derived from a
      shared Diffie-Hellman value and is only known to the client and the
      server.
@@ -102,15 +102,15 @@
      If public key authentication fails or is not available a password can be
      sent encrypted to the remote host for proving the user's identity.
 
-     Additionally, ssh supports hostbased or challenge response authenticaM--
+     Additionally, ^[[1mssh ^[[22msupports hostbased or challenge response authentica-
      tion.
 
-     Protocol 2 provides additional mechanisms for confidentiality (the trafM--
+     Protocol 2 provides additional mechanisms for confidentiality (the traf-
      fic is encrypted using 3DES, Blowfish, CAST128 or Arcfour) and integrity
      (hmac-md5, hmac-sha1).  Note that protocol 1 lacks a strong mechanism for
      ensuring the integrity of the connection.
 
-   Login session and remote execution
+   ^[[1mLogin session and remote execution^[[0m
 
      When the user's identity has been accepted by the server, the server
      either executes the given command, or logs into the machine and gives the
@@ -126,66 +126,66 @@
      if a tty is used.
 
      The session terminates when the command or shell on the remote machine
-     exits and all X11 and TCP/IP connections have been closed.  The exit staM--
-     tus of the remote program is returned as the exit status of ssh.
+     exits and all X11 and TCP/IP connections have been closed.  The exit sta-
+     tus of the remote program is returned as the exit status of ^[[1mssh^[[22m.
 
-   Escape Characters
+   ^[[1mEscape Characters^[[0m
 
-     When a pseudo terminal has been requested, ssh supports a number of funcM--
+     When a pseudo terminal has been requested, ssh supports a number of func-
      tions through the use of an escape character.
 
-     A single tilde character can be sent as ~~ or by following the tilde by a
+     A single tilde character can be sent as ^[[1m~~ ^[[22mor by following the tilde by a
      character other than those described below.  The escape character must
-     always follow a newline to be interpreted as special.  The escape characM--
-     ter can be changed in configuration files using the EscapeChar configuraM--
-     tion directive or on the command line by the -e option.
+     always follow a newline to be interpreted as special.  The escape charac-
+     ter can be changed in configuration files using the ^[[1mEscapeChar ^[[22mconfigura-
+     tion directive or on the command line by the ^[[1m-e ^[[22moption.
 
      The supported escapes (assuming the default `~') are:
 
-     ~.      Disconnect
+     ^[[1m~.      ^[[22mDisconnect
 
-     ~^Z     Background ssh
+     ^[[1m~^Z     ^[[22mBackground ssh
 
-     ~#      List forwarded connections
+     ^[[1m~#      ^[[22mList forwarded connections
 
-     ~&      Background ssh at logout when waiting for forwarded connection /
+     ^[[1m~&      ^[[22mBackground ssh at logout when waiting for forwarded connection /
              X11 sessions to terminate
 
-     ~?      Display a list of escape characters
+     ^[[1m~?      ^[[22mDisplay a list of escape characters
 
-     ~C      Open command line (only useful for adding port forwardings using
-             the -L and -R options)
+     ^[[1m~C      ^[[22mOpen command line (only useful for adding port forwardings using
+             the ^[[1m-L ^[[22mand ^[[1m-R ^[[22moptions)
 
-     ~R      Request rekeying of the connection (only useful for SSH protocol
+     ^[[1m~R      ^[[22mRequest rekeying of the connection (only useful for SSH protocol
              version 2 and if the peer supports it)
 
-   X11 and TCP forwarding
+   ^[[1mX11 and TCP forwarding^[[0m
 
-     If the ForwardX11 variable is set to ``yes'' (or, see the description of
-     the -X and -x options described later) and the user is using X11 (the
+     If the ^[[1mForwardX11 ^[[22mvariable is set to ``yes'' (or, see the description of
+     the ^[[1m-X ^[[22mand ^[[1m-x ^[[22moptions described later) and the user is using X11 (the
      DISPLAY environment variable is set), the connection to the X11 display
      is automatically forwarded to the remote side in such a way that any X11
      programs started from the shell (or command) will go through the
      encrypted channel, and the connection to the real X server will be made
-     from the local machine.  The user should not manually set DISPLAY.  ForM--
+     from the local machine.  The user should not manually set DISPLAY.  For-
      warding of X11 connections can be configured on the command line or in
      configuration files.
 
-     The DISPLAY value set by ssh will point to the server machine, but with a
+     The DISPLAY value set by ^[[1mssh ^[[22mwill point to the server machine, but with a
      display number greater than zero.  This is normal, and happens because
-     ssh creates a ``proxy'' X server on the server machine for forwarding the
+     ^[[1mssh ^[[22mcreates a ``proxy'' X server on the server machine for forwarding the
      connections over the encrypted channel.
 
-     ssh will also automatically set up Xauthority data on the server machine.
+     ^[[1mssh ^[[22mwill also automatically set up Xauthority data on the server machine.
      For this purpose, it will generate a random authorization cookie, store
      it in Xauthority on the server, and verify that any forwarded connections
      carry this cookie and replace it by the real cookie when the connection
      is opened.  The real authentication cookie is never sent to the server
      machine (and no cookies are sent in the plain).
 
-     If the ForwardAgent variable is set to ``yes'' (or, see the description
-     of the -A and -a options described later) and the user is using an
-     authentication agent, the connection to the agent is automatically forM--
+     If the ^[[1mForwardAgent ^[[22mvariable is set to ``yes'' (or, see the description
+     of the ^[[1m-A ^[[22mand ^[[1m-a ^[[22moptions described later) and the user is using an
+     authentication agent, the connection to the agent is automatically for-
      warded to the remote side.
 
      Forwarding of arbitrary TCP/IP connections over the secure channel can be
@@ -193,25 +193,25 @@
      possible application of TCP/IP forwarding is a secure connection to an
      electronic purse; another is going through firewalls.
 
-   Server authentication
+   ^[[1mServer authentication^[[0m
 
-     ssh automatically maintains and checks a database containing identificaM--
+     ^[[1mssh ^[[22mautomatically maintains and checks a database containing identifica-
      tions for all hosts it has ever been used with.  Host keys are stored in
-     $HOME/.ssh/known_hosts in the user's home directory.  Additionally, the
-     file /etc/ssh/ssh_known_hosts is automatically checked for known hosts.
+     ^[[4m$HOME/.ssh/known_hosts^[[24m in the user's home directory.  Additionally, the
+     file ^[[4m/etc/ssh/ssh_known_hosts^[[24m is automatically checked for known hosts.
      Any new hosts are automatically added to the user's file.  If a host's
-     identification ever changes, ssh warns about this and disables password
-     authentication to prevent a trojan horse from getting the user's passM--
+     identification ever changes, ^[[1mssh ^[[22mwarns about this and disables password
+     authentication to prevent a trojan horse from getting the user's pass-
      word.  Another purpose of this mechanism is to prevent man-in-the-middle
      attacks which could otherwise be used to circumvent the encryption.  The
-     StrictHostKeyChecking option can be used to prevent logins to machines
+     ^[[1mStrictHostKeyChecking ^[[22moption can be used to prevent logins to machines
      whose host key is not known or has changed.
 
      The options are as follows:
 
-     -a      Disables forwarding of the authentication agent connection.
+     ^[[1m-a      ^[[22mDisables forwarding of the authentication agent connection.
 
-     -A      Enables forwarding of the authentication agent connection.  This
+     ^[[1m-A      ^[[22mEnables forwarding of the authentication agent connection.  This
              can also be specified on a per-host basis in a configuration
              file.
 
@@ -223,26 +223,26 @@
              that enable them to authenticate using the identities loaded into
              the agent.
 
-     -b bind_address
+     ^[[1m-b ^[[4m^[[22mbind_address^[[0m
              Specify the interface to transmit from on machines with multiple
              interfaces or aliased addresses.
 
-     -c blowfish|3des|des
-             Selects the cipher to use for encrypting the session.  3des is
-             used by default.  It is believed to be secure.  3des (triple-des)
+     ^[[1m-c ^[[4m^[[22mblowfish|3des|des^[[0m
+             Selects the cipher to use for encrypting the session.  ^[[4m3des^[[24m is
+             used by default.  It is believed to be secure.  ^[[4m3des^[[24m (triple-des)
              is an encrypt-decrypt-encrypt triple with three different keys.
-             blowfish is a fast block cipher, it appears very secure and is
-             much faster than 3des.  des is only supported in the ssh client
+             ^[[4mblowfish^[[24m is a fast block cipher, it appears very secure and is
+             much faster than ^[[4m3des^[[24m.  ^[[4mdes^[[24m is only supported in the ^[[1mssh ^[[22mclient
              for interoperability with legacy protocol 1 implementations that
-             do not support the 3des cipher.  Its use is strongly discouraged
+             do not support the ^[[4m3des^[[24m cipher.  Its use is strongly discouraged
              due to cryptographic weaknesses.
 
-     -c cipher_spec
+     ^[[1m-c ^[[4m^[[22mcipher_spec^[[0m
              Additionally, for protocol version 2 a comma-separated list of
-             ciphers can be specified in order of preference.  See Ciphers for
+             ciphers can be specified in order of preference.  See ^[[1mCiphers ^[[22mfor
              more information.
 
-     -e ch|^ch|none
+     ^[[1m-e ^[[4m^[[22mch|^ch|none^[[0m
              Sets the escape character for sessions with a pty (default: `~').
              The escape character is only recognized at the beginning of a
              line.  The escape character followed by a dot (`.') closes the
@@ -251,86 +251,86 @@
              character to ``none'' disables any escapes and makes the session
              fully transparent.
 
-     -f      Requests ssh to go to background just before command execution.
-             This is useful if ssh is going to ask for passwords or
+     ^[[1m-f      ^[[22mRequests ^[[1mssh ^[[22mto go to background just before command execution.
+             This is useful if ^[[1mssh ^[[22mis going to ask for passwords or
              passphrases, but the user wants it in the background.  This
-             implies -n.  The recommended way to start X11 programs at a
-             remote site is with something like ssh -f host xterm.
+             implies ^[[1m-n^[[22m.  The recommended way to start X11 programs at a
+             remote site is with something like ^[[1mssh -f host xterm^[[22m.
 
-     -g      Allows remote hosts to connect to local forwarded ports.
+     ^[[1m-g      ^[[22mAllows remote hosts to connect to local forwarded ports.
 
-     -i identity_file
+     ^[[1m-i ^[[4m^[[22midentity_file^[[0m
              Selects a file from which the identity (private key) for RSA or
-             DSA authentication is read.  The default is $HOME/.ssh/identity
-             for protocol version 1, and $HOME/.ssh/id_rsa and
-             $HOME/.ssh/id_dsa for protocol version 2.  Identity files may
+             DSA authentication is read.  The default is ^[[4m$HOME/.ssh/identity^[[0m
+             for protocol version 1, and ^[[4m$HOME/.ssh/id_rsa^[[24m and
+             ^[[4m$HOME/.ssh/id_dsa^[[24m for protocol version 2.  Identity files may
              also be specified on a per-host basis in the configuration file.
-             It is possible to have multiple -i options (and multiple identiM--
+             It is possible to have multiple ^[[1m-i ^[[22moptions (and multiple identi-
              ties specified in configuration files).
 
-     -I smartcard_device
+     ^[[1m-I ^[[4m^[[22msmartcard_device^[[0m
              Specifies which smartcard device to use. The argument is the
-             device ssh should use to communicate with a smartcard used for
+             device ^[[1mssh ^[[22mshould use to communicate with a smartcard used for
              storing the user's private RSA key.
 
-     -k      Disables forwarding of Kerberos tickets and AFS tokens.  This may
+     ^[[1m-k      ^[[22mDisables forwarding of Kerberos tickets and AFS tokens.  This may
              also be specified on a per-host basis in the configuration file.
 
-     -l login_name
+     ^[[1m-l ^[[4m^[[22mlogin_name^[[0m
              Specifies the user to log in as on the remote machine.  This also
              may be specified on a per-host basis in the configuration file.
 
-     -m mac_spec
+     ^[[1m-m ^[[4m^[[22mmac_spec^[[0m
              Additionally, for protocol version 2 a comma-separated list of
              MAC (message authentication code) algorithms can be specified in
-             order of preference.  See the MACs keyword for more information.
+             order of preference.  See the ^[[1mMACs ^[[22mkeyword for more information.
 
-     -n      Redirects stdin from /dev/null (actually, prevents reading from
-             stdin).  This must be used when ssh is run in the background.  A
+     ^[[1m-n      ^[[22mRedirects stdin from ^[[4m/dev/null^[[24m (actually, prevents reading from
+             stdin).  This must be used when ^[[1mssh ^[[22mis run in the background.  A
              common trick is to use this to run X11 programs on a remote
-             machine.  For example, ssh -n shadows.cs.hut.fi emacs & will
+             machine.  For example, ^[[1mssh -n shadows.cs.hut.fi emacs & ^[[22mwill
              start an emacs on shadows.cs.hut.fi, and the X11 connection will
-             be automatically forwarded over an encrypted channel.  The ssh
+             be automatically forwarded over an encrypted channel.  The ^[[1mssh^[[0m
              program will be put in the background.  (This does not work if
-             ssh needs to ask for a password or passphrase; see also the -f
+             ^[[1mssh ^[[22mneeds to ask for a password or passphrase; see also the ^[[1m-f^[[0m
              option.)
 
-     -N      Do not execute a remote command.  This is useful for just forM--
+     ^[[1m-N      ^[[22mDo not execute a remote command.  This is useful for just for-
              warding ports (protocol version 2 only).
 
-     -o option
-             Can be used to give options in the format used in the configuraM--
+     ^[[1m-o ^[[4m^[[22moption^[[0m
+             Can be used to give options in the format used in the configura-
              tion file.  This is useful for specifying options for which there
              is no separate command-line flag.
 
-     -p port
+     ^[[1m-p ^[[4m^[[22mport^[[0m
              Port to connect to on the remote host.  This can be specified on
              a per-host basis in the configuration file.
 
-     -q      Quiet mode.  Causes all warning and diagnostic messages to be
+     ^[[1m-q      ^[[22mQuiet mode.  Causes all warning and diagnostic messages to be
              suppressed.
 
-     -s      May be used to request invocation of a subsystem on the remote
+     ^[[1m-s      ^[[22mMay be used to request invocation of a subsystem on the remote
              system. Subsystems are a feature of the SSH2 protocol which
-             facilitate the use of SSH as a secure transport for other appliM--
-             cations (eg. sftp). The subsystem is specified as the remote comM--
+             facilitate the use of SSH as a secure transport for other appli-
+             cations (eg. sftp). The subsystem is specified as the remote com-
              mand.
 
-     -t      Force pseudo-tty allocation.  This can be used to execute arbiM--
+     ^[[1m-t      ^[[22mForce pseudo-tty allocation.  This can be used to execute arbi-
              trary screen-based programs on a remote machine, which can be
-             very useful, e.g., when implementing menu services.  Multiple -t
-             options force tty allocation, even if ssh has no local tty.
+             very useful, e.g., when implementing menu services.  Multiple ^[[1m-t^[[0m
+             options force tty allocation, even if ^[[1mssh ^[[22mhas no local tty.
 
-     -T      Disable pseudo-tty allocation.
+     ^[[1m-T      ^[[22mDisable pseudo-tty allocation.
 
-     -v      Verbose mode.  Causes ssh to print debugging messages about its
-             progress.  This is helpful in debugging connection, authenticaM--
-             tion, and configuration problems.  Multiple -v options increases
+     ^[[1m-v      ^[[22mVerbose mode.  Causes ^[[1mssh ^[[22mto print debugging messages about its
+             progress.  This is helpful in debugging connection, authentica-
+             tion, and configuration problems.  Multiple ^[[1m-v ^[[22moptions increases
              the verbosity.  Maximum is 3.
 
-     -x      Disables X11 forwarding.
+     ^[[1m-x      ^[[22mDisables X11 forwarding.
 
-     -X      Enables X11 forwarding.  This can also be specified on a per-host
+     ^[[1m-X      ^[[22mEnables X11 forwarding.  This can also be specified on a per-host
              basis in a configuration file.
 
              X11 forwarding should be enabled with caution.  Users with the
@@ -339,76 +339,76 @@
              through the forwarded connection.  An attacker may then be able
              to perform activities such as keystroke monitoring.
 
-     -C      Requests compression of all data (including stdin, stdout,
+     ^[[1m-C      ^[[22mRequests compression of all data (including stdin, stdout,
              stderr, and data for forwarded X11 and TCP/IP connections).  The
              compression algorithm is the same used by gzip(1), and the
-             ``level'' can be controlled by the CompressionLevel option for
+             ``level'' can be controlled by the ^[[1mCompressionLevel ^[[22moption for
              protocol version 1.  Compression is desirable on modem lines and
              other slow connections, but will only slow down things on fast
              networks.  The default value can be set on a host-by-host basis
-             in the configuration files; see the Compression option.
+             in the configuration files; see the ^[[1mCompression ^[[22moption.
 
-     -F configfile
-             Specifies an alternative per-user configuration file.  If a conM--
+     ^[[1m-F ^[[4m^[[22mconfigfile^[[0m
+             Specifies an alternative per-user configuration file.  If a con-
              figuration file is given on the command line, the system-wide
-             configuration file (/etc/ssh/ssh_config) will be ignored.  The
-             default for the per-user configuration file is $HOME/.ssh/config.
+             configuration file (^[[4m/etc/ssh/ssh_config^[[24m) will be ignored.  The
+             default for the per-user configuration file is ^[[4m$HOME/.ssh/config^[[24m.
 
-     -L port:host:hostport
+     ^[[1m-L ^[[4m^[[22mport:host:hostport^[[0m
              Specifies that the given port on the local (client) host is to be
              forwarded to the given host and port on the remote side.  This
-             works by allocating a socket to listen to port on the local side,
+             works by allocating a socket to listen to ^[[4mport^[[24m on the local side,
              and whenever a connection is made to this port, the connection is
              forwarded over the secure channel, and a connection is made to
-             host port hostport from the remote machine.  Port forwardings can
-             also be specified in the configuration file.  Only root can forM--
+             ^[[4mhost^[[24m port ^[[4mhostport^[[24m from the remote machine.  Port forwardings can
+             also be specified in the configuration file.  Only root can for-
              ward privileged ports.  IPv6 addresses can be specified with an
-             alternative syntax: port/host/hostport
+             alternative syntax: ^[[4mport/host/hostport^[[0m
 
-     -R port:host:hostport
+     ^[[1m-R ^[[4m^[[22mport:host:hostport^[[0m
              Specifies that the given port on the remote (server) host is to
              be forwarded to the given host and port on the local side.  This
-             works by allocating a socket to listen to port on the remote
-             side, and whenever a connection is made to this port, the connecM--
+             works by allocating a socket to listen to ^[[4mport^[[24m on the remote
+             side, and whenever a connection is made to this port, the connec-
              tion is forwarded over the secure channel, and a connection is
-             made to host port hostport from the local machine.  Port forwardM--
+             made to ^[[4mhost^[[24m port ^[[4mhostport^[[24m from the local machine.  Port forward-
              ings can also be specified in the configuration file.  Privileged
              ports can be forwarded only when logging in as root on the remote
              machine.  IPv6 addresses can be specified with an alternative
-             syntax: port/host/hostport
+             syntax: ^[[4mport/host/hostport^[[0m
 
-     -D port
+     ^[[1m-D ^[[4m^[[22mport^[[0m
              Specifies a local ``dynamic'' application-level port forwarding.
-             This works by allocating a socket to listen to port on the local
-             side, and whenever a connection is made to this port, the connecM--
+             This works by allocating a socket to listen to ^[[4mport^[[24m on the local
+             side, and whenever a connection is made to this port, the connec-
              tion is forwarded over the secure channel, and the application
              protocol is then used to determine where to connect to from the
              remote machine.  Currently the SOCKS4 protocol is supported, and
-             ssh will act as a SOCKS4 server.  Only root can forward priviM--
+             ^[[1mssh ^[[22mwill act as a SOCKS4 server.  Only root can forward privi-
              leged ports.  Dynamic port forwardings can also be specified in
              the configuration file.
 
-     -1      Forces ssh to try protocol version 1 only.
+     ^[[1m-1      ^[[22mForces ^[[1mssh ^[[22mto try protocol version 1 only.
 
-     -2      Forces ssh to try protocol version 2 only.
+     ^[[1m-2      ^[[22mForces ^[[1mssh ^[[22mto try protocol version 2 only.
 
-     -4      Forces ssh to use IPv4 addresses only.
+     ^[[1m-4      ^[[22mForces ^[[1mssh ^[[22mto use IPv4 addresses only.
 
-     -6      Forces ssh to use IPv6 addresses only.
+     ^[[1m-6      ^[[22mForces ^[[1mssh ^[[22mto use IPv6 addresses only.
 
-CONFIGURATION FILES
-     ssh may additionally obtain configuration data from a per-user configuraM--
-     tion file and a system-wide configuration file.  The file format and conM--
+^[[1mCONFIGURATION FILES^[[0m
+     ^[[1mssh ^[[22mmay additionally obtain configuration data from a per-user configura-
+     tion file and a system-wide configuration file.  The file format and con-
      figuration options are described in ssh_config(5).
 
-ENVIRONMENT
-     ssh will normally set the following environment variables:
+^[[1mENVIRONMENT^[[0m
+     ^[[1mssh ^[[22mwill normally set the following environment variables:
 
      DISPLAY
              The DISPLAY variable indicates the location of the X11 server.
-             It is automatically set by ssh to point to a value of the form
+             It is automatically set by ^[[1mssh ^[[22mto point to a value of the form
              ``hostname:n'' where hostname indicates the host where the shell
-             runs, and n is an integer >= 1.  ssh uses this special value to
+             runs, and n is an integer >= 1.  ^[[1mssh ^[[22muses this special value to
              forward X11 connections over the secure channel.  The user should
              normally not set DISPLAY explicitly, as that will render the X11
              connection insecure (and will require the user to manually copy
@@ -422,17 +422,17 @@
 
      MAIL    Set to the path of the user's mailbox.
 
-     PATH    Set to the default PATH, as specified when compiling ssh.
+     PATH    Set to the default PATH, as specified when compiling ^[[1mssh^[[22m.
 
      SSH_ASKPASS
-             If ssh needs a passphrase, it will read the passphrase from the
-             current terminal if it was run from a terminal.  If ssh does not
+             If ^[[1mssh ^[[22mneeds a passphrase, it will read the passphrase from the
+             current terminal if it was run from a terminal.  If ^[[1mssh ^[[22mdoes not
              have a terminal associated with it but DISPLAY and SSH_ASKPASS
              are set, it will execute the program specified by SSH_ASKPASS and
              open an X11 window to read the passphrase.  This is particularly
-             useful when calling ssh from a .Xsession or related script.
+             useful when calling ^[[1mssh ^[[22mfrom a ^[[4m.Xsession^[[24m or related script.
              (Note that on some machines it may be necessary to redirect the
-             input from /dev/null to make this work.)
+             input from ^[[4m/dev/null^[[24m to make this work.)
 
      SSH_AUTH_SOCK
              Identifies the path of a unix-domain socket used to communicate
@@ -444,12 +444,12 @@
              client port number, server ip-address and server port number.
 
      SSH_ORIGINAL_COMMAND
-             The variable contains the original command line if a forced comM--
-             mand is executed.  It can be used to extract the original arguM--
+             The variable contains the original command line if a forced com-
+             mand is executed.  It can be used to extract the original argu-
              ments.
 
      SSH_TTY
-             This is set to the name of the tty (path to the device) associM--
+             This is set to the name of the tty (path to the device) associ-
              ated with the current shell or command.  If the current session
              has no tty, this variable is not set.
 
@@ -459,22 +459,22 @@
 
      USER    Set to the name of the user logging in.
 
-     Additionally, ssh reads $HOME/.ssh/environment, and adds lines of the
+     Additionally, ^[[1mssh ^[[22mreads ^[[4m$HOME/.ssh/environment^[[24m, and adds lines of the
      format ``VARNAME=value'' to the environment if the file exists and if
      users are allowed to change their environment.  See the
-     PermitUserEnvironment option in sshd_config(5).
+     ^[[1mPermitUserEnvironment ^[[22moption in sshd_config(5).
 
-FILES
+^[[1mFILES^[[0m
      $HOME/.ssh/known_hosts
              Records host keys for all hosts the user has logged into that are
-             not in /etc/ssh/ssh_known_hosts.  See sshd(8).
+             not in ^[[4m/etc/ssh/ssh_known_hosts^[[24m.  See sshd(8).
 
      $HOME/.ssh/identity, $HOME/.ssh/id_dsa, $HOME/.ssh/id_rsa
              Contains the authentication identity of the user.  They are for
              protocol 1 RSA, protocol 2 DSA, and protocol 2 RSA, respectively.
              These files contain sensitive data and should be readable by the
              user but not accessible by others (read/write/execute).  Note
-             that ssh ignores a private key file if it is accessible by othM--
+             that ^[[1mssh ^[[22mignores a private key file if it is accessible by oth-
              ers.  It is possible to specify a passphrase when generating the
              key; the passphrase will be used to encrypt the sensitive part of
              this file using 3DES.
@@ -482,15 +482,15 @@
      $HOME/.ssh/identity.pub, $HOME/.ssh/id_dsa.pub, $HOME/.ssh/id_rsa.pub
              Contains the public key for authentication (public part of the
              identity file in human-readable form).  The contents of the
-             $HOME/.ssh/identity.pub file should be added to
-             $HOME/.ssh/authorized_keys on all machines where the user wishes
-             to log in using protocol version 1 RSA authentication.  The conM--
-             tents of the $HOME/.ssh/id_dsa.pub and $HOME/.ssh/id_rsa.pub file
-             should be added to $HOME/.ssh/authorized_keys on all machines
+             ^[[4m$HOME/.ssh/identity.pub^[[24m file should be added to
+             ^[[4m$HOME/.ssh/authorized_keys^[[24m on all machines where the user wishes
+             to log in using protocol version 1 RSA authentication.  The con-
+             tents of the ^[[4m$HOME/.ssh/id_dsa.pub^[[24m and ^[[4m$HOME/.ssh/id_rsa.pub^[[24m file
+             should be added to ^[[4m$HOME/.ssh/authorized_keys^[[24m on all machines
              where the user wishes to log in using protocol version 2 DSA/RSA
              authentication.  These files are not sensitive and can (but need
-             not) be readable by anyone.  These files are never used automatiM--
-             cally and are not necessary; they are only provided for the conM--
+             not) be readable by anyone.  These files are never used automati-
+             cally and are not necessary; they are only provided for the con-
              venience of the user.
 
      $HOME/.ssh/config
@@ -510,15 +510,15 @@
              by the system administrator to contain the public host keys of
              all machines in the organization.  This file should be world-
              readable.  This file contains public keys, one per line, in the
-             following format (fields separated by spaces): system name, pubM--
+             following format (fields separated by spaces): system name, pub-
              lic key and optional comment field.  When different names are
-             used for the same machine, all such names should be listed, sepaM--
+             used for the same machine, all such names should be listed, sepa-
              rated by commas.  The format is described on the sshd(8) manual
              page.
 
              The canonical system name (as returned by name servers) is used
              by sshd(8) to verify the client host when logging in; other names
-             are needed because ssh does not convert the user-supplied name to
+             are needed because ^[[1mssh ^[[22mdoes not convert the user-supplied name to
              a canonical name before checking the key, because someone with
              access to the name servers would then be able to fool host
              authentication.
@@ -530,22 +530,22 @@
      /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key,
              /etc/ssh/ssh_host_rsa_key
              These three files contain the private parts of the host keys and
-             are used for RhostsRSAAuthentication and HostbasedAuthentication.
-             If the protocol version 1 RhostsRSAAuthentication method is used,
-             ssh must be setuid root, since the host key is readable only by
-             root.  For protocol version 2, ssh uses ssh-keysign(8) to access
-             the host keys for HostbasedAuthentication.  This eliminates the
-             requirement that ssh be setuid root when that authentication
-             method is used.  By default ssh is not setuid root.
+             are used for ^[[1mRhostsRSAAuthentication ^[[22mand ^[[1mHostbasedAuthentication^[[22m.
+             If the protocol version 1 ^[[1mRhostsRSAAuthentication ^[[22mmethod is used,
+             ^[[1mssh ^[[22mmust be setuid root, since the host key is readable only by
+             root.  For protocol version 2, ^[[1mssh ^[[22muses ssh-keysign(8) to access
+             the host keys for ^[[1mHostbasedAuthentication^[[22m.  This eliminates the
+             requirement that ^[[1mssh ^[[22mbe setuid root when that authentication
+             method is used.  By default ^[[1mssh ^[[22mis not setuid root.
 
      $HOME/.rhosts
-             This file is used in .rhosts authentication to list the host/user
+             This file is used in ^[[4m.rhosts^[[24m authentication to list the host/user
              pairs that are permitted to log in.  (Note that this file is also
              used by rlogin and rsh, which makes using this file insecure.)
              Each line of the file contains a host name (in the canonical form
              returned by name servers), and then a user name on that host,
              separated by a space.  On some machines this file may need to be
-             world-readable if the user's home directory is on a NFS partiM--
+             world-readable if the user's home directory is on a NFS parti-
              tion, because sshd(8) reads it as root.  Additionally, this file
              must be owned by the user, and must not have write permissions
              for anyone else.  The recommended permission for most machines is
@@ -554,18 +554,18 @@
              Note that by default sshd(8) will be installed so that it
              requires successful RSA host authentication before permitting
              .rhosts authentication.  If the server machine does not have the
-             client's host key in /etc/ssh/ssh_known_hosts, it can be stored
-             in $HOME/.ssh/known_hosts.  The easiest way to do this is to conM--
+             client's host key in ^[[4m/etc/ssh/ssh_known_hosts^[[24m, it can be stored
+             in ^[[4m$HOME/.ssh/known_hosts^[[24m.  The easiest way to do this is to con-
              nect back to the client from the server machine using ssh; this
-             will automatically add the host key to $HOME/.ssh/known_hosts.
+             will automatically add the host key to ^[[4m$HOME/.ssh/known_hosts^[[24m.
 
      $HOME/.shosts
-             This file is used exactly the same way as .rhosts.  The purpose
+             This file is used exactly the same way as ^[[4m.rhosts^[[24m.  The purpose
              for having this file is to be able to use rhosts authentication
-             with ssh without permitting login with rlogin or rsh(1).
+             with ^[[1mssh ^[[22mwithout permitting login with ^[[1mrlogin ^[[22mor rsh(1).
 
      /etc/hosts.equiv
-             This file is used during .rhosts authentication. It contains
+             This file is used during ^[[4m.rhosts^[[24m ^[[4mauthentication.^[[24m It contains
              canonical hosts names, one per line (the full format is described
              on the sshd(8) manual page).  If the client host is found in this
              file, login is automatically permitted provided client and server
@@ -574,41 +574,41 @@
              writable by root.
 
      /etc/shosts.equiv
-             This file is processed exactly as /etc/hosts.equiv.  This file
-             may be useful to permit logins using ssh but not using
+             This file is processed exactly as ^[[4m/etc/hosts.equiv^[[24m.  This file
+             may be useful to permit logins using ^[[1mssh ^[[22mbut not using
              rsh/rlogin.
 
      /etc/ssh/sshrc
-             Commands in this file are executed by ssh when the user logs in
+             Commands in this file are executed by ^[[1mssh ^[[22mwhen the user logs in
              just before the user's shell (or command) is started.  See the
              sshd(8) manual page for more information.
 
      $HOME/.ssh/rc
-             Commands in this file are executed by ssh when the user logs in
+             Commands in this file are executed by ^[[1mssh ^[[22mwhen the user logs in
              just before the user's shell (or command) is started.  See the
              sshd(8) manual page for more information.
 
      $HOME/.ssh/environment
              Contains additional definitions for environment variables, see
-             section ENVIRONMENT above.
+             section ^[[4mENVIRONMENT^[[24m above.
 
-DIAGNOSTICS
-     ssh exits with the exit status of the remote command or with 255 if an
+^[[1mDIAGNOSTICS^[[0m
+     ^[[1mssh ^[[22mexits with the exit status of the remote command or with 255 if an
      error occurred.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      OpenSSH is a derivative of the original and free ssh 1.2.12 release by
      Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
-     de Raadt and Dug Song removed many bugs, re-added newer features and creM--
+     de Raadt and Dug Song removed many bugs, re-added newer features and cre-
      ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      rsh(1), scp(1), sftp(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
      telnet(1), ssh_config(5), ssh-keysign(8), sshd(8)
 
-     T. Ylonen, T. Kivinen, M. Saarinen, T. Rinne, and S. Lehtinen, SSH
-     Protocol Architecture, draft-ietf-secsh-architecture-12.txt, January
+     T. Ylonen, T. Kivinen, M. Saarinen, T. Rinne, and S. Lehtinen, ^[[4mSSH^[[0m
+     ^[[4mProtocol^[[24m ^[[4mArchitecture^[[24m, draft-ietf-secsh-architecture-12.txt, January
      2002, work in progress material.
 
 BSD                           September 25, 1999                           BSD
diff -ru openssh-3.5p1.orig/ssh_config.0 openssh-3.5p1/ssh_config.0
--- openssh-3.5p1.orig/ssh_config.0	2002-10-04 11:31:47.000000000 +1000
+++ openssh-3.5p1/ssh_config.0	2003-03-12 21:15:29.000000000 +1100
@@ -1,26 +1,26 @@
-SSH_CONFIG(5)             System File Formats Manual             SSH_CONFIG(5)
+SSH_CONFIG(5)               BSD File Formats Manual              SSH_CONFIG(5)
 
-NAME
-     ssh_config - OpenSSH SSH client configuration files
+^[[1mNAME^[[0m
+     ^[[1mssh_config ^[[22m- OpenSSH SSH client configuration files
 
-SYNOPSIS
-     $HOME/.ssh/config
-     /etc/ssh/ssh_config
+^[[1mSYNOPSIS^[[0m
+     ^[[4m$HOME/.ssh/config^[[0m
+     ^[[4m/etc/ssh/ssh_config^[[0m
 
-DESCRIPTION
-     ssh obtains configuration data from the following sources in the followM--
+^[[1mDESCRIPTION^[[0m
+     ^[[1mssh ^[[22mobtains configuration data from the following sources in the follow-
      ing order:
            1.   command-line options
-           2.   user's configuration file ($HOME/.ssh/config)
-           3.   system-wide configuration file (/etc/ssh/ssh_config)
+           2.   user's configuration file (^[[4m$HOME/.ssh/config^[[24m)
+           3.   system-wide configuration file (^[[4m/etc/ssh/ssh_config^[[24m)
 
-     For each parameter, the first obtained value will be used.  The configuM--
+     For each parameter, the first obtained value will be used.  The configu-
      ration files contain sections bracketed by ``Host'' specifications, and
      that section is only applied for hosts that match one of the patterns
      given in the specification.  The matched host name is the one given on
      the command line.
 
-     Since the first obtained value for each parameter is used, more host-speM--
+     Since the first obtained value for each parameter is used, more host-spe-
      cific declarations should be given near the beginning of the file, and
      general defaults at the end.
 
@@ -30,57 +30,57 @@
 
      Otherwise a line is of the format ``keyword arguments''.  Configuration
      options may be separated by whitespace or optional whitespace and exactly
-     one `='; the latter format is useful to avoid the need to quote whitesM--
-     pace when specifying configuration options using the ssh, scp and sftp -o
+     one `='; the latter format is useful to avoid the need to quote whites-
+     pace when specifying configuration options using the ^[[1mssh^[[22m, ^[[1mscp ^[[22mand ^[[1msftp -o^[[0m
      option.
 
-     The possible keywords and their meanings are as follows (note that keyM--
+     The possible keywords and their meanings are as follows (note that key-
      words are case-insensitive and arguments are case-sensitive):
 
-     Host    Restricts the following declarations (up to the next Host keyM--
+     ^[[1mHost    ^[[22mRestricts the following declarations (up to the next ^[[1mHost ^[[22mkey-
              word) to be only for those hosts that match one of the patterns
              given after the keyword.  `*' and `'?  can be used as wildcards
-             in the patterns.  A single `*' as a pattern can be used to proM--
-             vide global defaults for all hosts.  The host is the hostname
-             argument given on the command line (i.e., the name is not conM--
+             in the patterns.  A single `*' as a pattern can be used to pro-
+             vide global defaults for all hosts.  The host is the ^[[4mhostname^[[0m
+             argument given on the command line (i.e., the name is not con-
              verted to a canonicalized host name before matching).
 
-     AFSTokenPassing
-             Specifies whether to pass AFS tokens to remote host.  The arguM--
+     ^[[1mAFSTokenPassing^[[0m
+             Specifies whether to pass AFS tokens to remote host.  The argu-
              ment to this keyword must be ``yes'' or ``no''.  This option
              applies to protocol version 1 only.
 
-     BatchMode
+     ^[[1mBatchMode^[[0m
              If set to ``yes'', passphrase/password querying will be disabled.
              This option is useful in scripts and other batch jobs where no
              user is present to supply the password.  The argument must be
              ``yes'' or ``no''.  The default is ``no''.
 
-     BindAddress
+     ^[[1mBindAddress^[[0m
              Specify the interface to transmit from on machines with multiple
              interfaces or aliased addresses.  Note that this option does not
-             work if UsePrivilegedPort is set to ``yes''.
+             work if ^[[1mUsePrivilegedPort ^[[22mis set to ``yes''.
 
-     ChallengeResponseAuthentication
+     ^[[1mChallengeResponseAuthentication^[[0m
              Specifies whether to use challenge response authentication.  The
              argument to this keyword must be ``yes'' or ``no''.  The default
              is ``yes''.
 
-     CheckHostIP
+     ^[[1mCheckHostIP^[[0m
              If this flag is set to ``yes'', ssh will additionally check the
-             host IP address in the known_hosts file.  This allows ssh to
+             host IP address in the ^[[4mknown_hosts^[[24m file.  This allows ssh to
              detect if a host key changed due to DNS spoofing.  If the option
              is set to ``no'', the check will not be executed.  The default is
              ``yes''.
 
-     Cipher  Specifies the cipher to use for encrypting the session in protoM--
+     ^[[1mCipher  ^[[22mSpecifies the cipher to use for encrypting the session in proto-
              col version 1.  Currently, ``blowfish'', ``3des'', and ``des''
-             are supported.  des is only supported in the ssh client for
+             are supported.  ^[[4mdes^[[24m is only supported in the ^[[1mssh ^[[22mclient for
              interoperability with legacy protocol 1 implementations that do
-             not support the 3des cipher.  Its use is strongly discouraged due
+             not support the ^[[4m3des^[[24m cipher.  Its use is strongly discouraged due
              to cryptographic weaknesses.  The default is ``3des''.
 
-     Ciphers
+     ^[[1mCiphers^[[0m
              Specifies the ciphers allowed for protocol version 2 in order of
              preference.  Multiple ciphers must be comma-separated.  The
              default is
@@ -88,48 +88,48 @@
                ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
                  aes192-cbc,aes256-cbc''
 
-     ClearAllForwardings
+     ^[[1mClearAllForwardings^[[0m
              Specifies that all local, remote and dynamic port forwardings
              specified in the configuration files or on the command line be
-             cleared.  This option is primarily useful when used from the ssh
+             cleared.  This option is primarily useful when used from the ^[[1mssh^[[0m
              command line to clear port forwardings set in configuration
-             files, and is automatically set by scp(1) and sftp(1).  The arguM--
+             files, and is automatically set by scp(1) and sftp(1).  The argu-
              ment must be ``yes'' or ``no''.  The default is ``no''.
 
-     Compression
+     ^[[1mCompression^[[0m
              Specifies whether to use compression.  The argument must be
              ``yes'' or ``no''.  The default is ``no''.
 
-     CompressionLevel
+     ^[[1mCompressionLevel^[[0m
              Specifies the compression level to use if compression is enabled.
              The argument must be an integer from 1 (fast) to 9 (slow, best).
              The default level is 6, which is good for most applications.  The
              meaning of the values is the same as in gzip(1).  Note that this
              option applies to protocol version 1 only.
 
-     ConnectionAttempts
+     ^[[1mConnectionAttempts^[[0m
              Specifies the number of tries (one per second) to make before
              exiting.  The argument must be an integer.  This may be useful in
              scripts if the connection sometimes fails.  The default is 1.
 
-     DynamicForward
+     ^[[1mDynamicForward^[[0m
              Specifies that a TCP/IP port on the local machine be forwarded
              over the secure channel, and the application protocol is then
              used to determine where to connect to from the remote machine.
-             The argument must be a port number.  Currently the SOCKS4 protoM--
-             col is supported, and ssh will act as a SOCKS4 server.  Multiple
+             The argument must be a port number.  Currently the SOCKS4 proto-
+             col is supported, and ^[[1mssh ^[[22mwill act as a SOCKS4 server.  Multiple
              forwardings may be specified, and additional forwardings can be
-             given on the command line.  Only the superuser can forward priviM--
+             given on the command line.  Only the superuser can forward privi-
              leged ports.
 
-     EscapeChar
+     ^[[1mEscapeChar^[[0m
              Sets the escape character (default: `~').  The escape character
              can also be set on the command line.  The argument should be a
-             single character, `^' followed by a letter, or ``none'' to disM--
-             able the escape character entirely (making the connection transM--
+             single character, `^' followed by a letter, or ``none'' to dis-
+             able the escape character entirely (making the connection trans-
              parent for binary data).
 
-     ForwardAgent
+     ^[[1mForwardAgent^[[0m
              Specifies whether the connection to the authentication agent (if
              any) will be forwarded to the remote machine.  The argument must
              be ``yes'' or ``no''.  The default is ``no''.
@@ -142,8 +142,8 @@
              that enable them to authenticate using the identities loaded into
              the agent.
 
-     ForwardX11
-             Specifies whether X11 connections will be automatically rediM--
+     ^[[1mForwardX11^[[0m
+             Specifies whether X11 connections will be automatically redi-
              rected over the secure channel and DISPLAY set.  The argument
              must be ``yes'' or ``no''.  The default is ``no''.
 
@@ -153,60 +153,60 @@
              through the forwarded connection.  An attacker may then be able
              to perform activities such as keystroke monitoring.
 
-     GatewayPorts
+     ^[[1mGatewayPorts^[[0m
              Specifies whether remote hosts are allowed to connect to local
-             forwarded ports.  By default, ssh binds local port forwardings to
-             the loopback address.  This prevents other remote hosts from conM--
-             necting to forwarded ports.  GatewayPorts can be used to specify
-             that ssh should bind local port forwardings to the wildcard
+             forwarded ports.  By default, ^[[1mssh ^[[22mbinds local port forwardings to
+             the loopback address.  This prevents other remote hosts from con-
+             necting to forwarded ports.  ^[[1mGatewayPorts ^[[22mcan be used to specify
+             that ^[[1mssh ^[[22mshould bind local port forwardings to the wildcard
              address, thus allowing remote hosts to connect to forwarded
              ports.  The argument must be ``yes'' or ``no''.  The default is
              ``no''.
 
-     GlobalKnownHostsFile
+     ^[[1mGlobalKnownHostsFile^[[0m
              Specifies a file to use for the global host key database instead
-             of /etc/ssh/ssh_known_hosts.
+             of ^[[4m/etc/ssh/ssh_known_hosts^[[24m.
 
-     HostbasedAuthentication
+     ^[[1mHostbasedAuthentication^[[0m
              Specifies whether to try rhosts based authentication with public
              key authentication.  The argument must be ``yes'' or ``no''.  The
              default is ``no''.  This option applies to protocol version 2
-             only and is similar to RhostsRSAAuthentication.
+             only and is similar to ^[[1mRhostsRSAAuthentication^[[22m.
 
-     HostKeyAlgorithms
+     ^[[1mHostKeyAlgorithms^[[0m
              Specifies the protocol version 2 host key algorithms that the
              client wants to use in order of preference.  The default for this
              option is: ``ssh-rsa,ssh-dss''.
 
-     HostKeyAlias
+     ^[[1mHostKeyAlias^[[0m
              Specifies an alias that should be used instead of the real host
              name when looking up or saving the host key in the host key
-             database files.  This option is useful for tunneling ssh connecM--
+             database files.  This option is useful for tunneling ssh connec-
              tions or for multiple servers running on a single host.
 
-     HostName
+     ^[[1mHostName^[[0m
              Specifies the real host name to log into.  This can be used to
              specify nicknames or abbreviations for hosts.  Default is the
              name given on the command line.  Numeric IP addresses are also
-             permitted (both on the command line and in HostName specificaM--
+             permitted (both on the command line and in ^[[1mHostName ^[[22mspecifica-
              tions).
 
-     IdentityFile
+     ^[[1mIdentityFile^[[0m
              Specifies a file from which the user's RSA or DSA authentication
-             identity is read. The default is $HOME/.ssh/identity for protocol
-             version 1, and $HOME/.ssh/id_rsa and $HOME/.ssh/id_dsa for protoM--
+             identity is read. The default is ^[[4m$HOME/.ssh/identity^[[24m for protocol
+             version 1, and ^[[4m$HOME/.ssh/id_rsa^[[24m and ^[[4m$HOME/.ssh/id_dsa^[[24m for proto-
              col version 2.  Additionally, any identities represented by the
              authentication agent will be used for authentication.  The file
-             name may use the tilde syntax to refer to a user's home direcM--
+             name may use the tilde syntax to refer to a user's home direc-
              tory.  It is possible to have multiple identity files specified
              in configuration files; all these identities will be tried in
              sequence.
 
-     KeepAlive
+     ^[[1mKeepAlive^[[0m
              Specifies whether the system should send TCP keepalive messages
              to the other side.  If they are sent, death of the connection or
              crash of one of the machines will be properly noticed.  However,
-             this means that connections will die if the route is down temM--
+             this means that connections will die if the route is down tem-
              porarily, and some people find it annoying.
 
              The default is ``yes'' (to send keepalives), and the client will
@@ -215,171 +215,171 @@
 
              To disable keepalives, the value should be set to ``no''.
 
-     KerberosAuthentication
+     ^[[1mKerberosAuthentication^[[0m
              Specifies whether Kerberos authentication will be used.  The
              argument to this keyword must be ``yes'' or ``no''.
 
-     KerberosTgtPassing
+     ^[[1mKerberosTgtPassing^[[0m
              Specifies whether a Kerberos TGT will be forwarded to the server.
              This will only work if the Kerberos server is actually an AFS
              kaserver.  The argument to this keyword must be ``yes'' or
              ``no''.
 
-     LocalForward
+     ^[[1mLocalForward^[[0m
              Specifies that a TCP/IP port on the local machine be forwarded
              over the secure channel to the specified host and port from the
              remote machine.  The first argument must be a port number, and
-             the second must be host:port.  IPv6 addresses can be specified
-             with an alternative syntax: host/port.  Multiple forwardings may
-             be specified, and additional forwardings can be given on the comM--
+             the second must be ^[[4mhost:port^[[24m.  IPv6 addresses can be specified
+             with an alternative syntax: ^[[4mhost/port^[[24m.  Multiple forwardings may
+             be specified, and additional forwardings can be given on the com-
              mand line.  Only the superuser can forward privileged ports.
 
-     LogLevel
+     ^[[1mLogLevel^[[0m
              Gives the verbosity level that is used when logging messages from
-             ssh.  The possible values are: QUIET, FATAL, ERROR, INFO, VERM--
+             ^[[1mssh^[[22m.  The possible values are: QUIET, FATAL, ERROR, INFO, VER-
              BOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3.  The default is INFO.
              DEBUG and DEBUG1 are equivalent.  DEBUG2 and DEBUG3 each specify
              higher levels of verbose output.
 
-     MACs    Specifies the MAC (message authentication code) algorithms in
-             order of preference.  The MAC algorithm is used in protocol verM--
+     ^[[1mMACs    ^[[22mSpecifies the MAC (message authentication code) algorithms in
+             order of preference.  The MAC algorithm is used in protocol ver-
              sion 2 for data integrity protection.  Multiple algorithms must
              be comma-separated.  The default is
              ``hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96''.
 
-     NoHostAuthenticationForLocalhost
+     ^[[1mNoHostAuthenticationForLocalhost^[[0m
              This option can be used if the home directory is shared across
              machines.  In this case localhost will refer to a different
-             machine on each of the machines and the user will get many warnM--
+             machine on each of the machines and the user will get many warn-
              ings about changed host keys.  However, this option disables host
              authentication for localhost.  The argument to this keyword must
              be ``yes'' or ``no''.  The default is to check the host key for
              localhost.
 
-     NumberOfPasswordPrompts
+     ^[[1mNumberOfPasswordPrompts^[[0m
              Specifies the number of password prompts before giving up.  The
              argument to this keyword must be an integer.  Default is 3.
 
-     PasswordAuthentication
+     ^[[1mPasswordAuthentication^[[0m
              Specifies whether to use password authentication.  The argument
              to this keyword must be ``yes'' or ``no''.  The default is
              ``yes''.
 
-     Port    Specifies the port number to connect on the remote host.  Default
+     ^[[1mPort    ^[[22mSpecifies the port number to connect on the remote host.  Default
              is 22.
 
-     PreferredAuthentications
+     ^[[1mPreferredAuthentications^[[0m
              Specifies the order in which the client should try protocol 2
              authentication methods. This allows a client to prefer one method
-             (e.g.  keyboard-interactive) over another method (e.g.  password)
+             (e.g.  ^[[1mkeyboard-interactive^[[22m) over another method (e.g.  ^[[1mpassword^[[22m)
              The default for this option is:
              ``hostbased,publickey,keyboard-interactive,password''.
 
-     Protocol
-             Specifies the protocol versions ssh should support in order of
+     ^[[1mProtocol^[[0m
+             Specifies the protocol versions ^[[1mssh ^[[22mshould support in order of
              preference.  The possible values are ``1'' and ``2''.  Multiple
              versions must be comma-separated.  The default is ``2,1''.  This
-             means that ssh tries version 2 and falls back to version 1 if
+             means that ^[[1mssh ^[[22mtries version 2 and falls back to version 1 if
              version 2 is not available.
 
-     ProxyCommand
-             Specifies the command to use to connect to the server.  The comM--
+     ^[[1mProxyCommand^[[0m
+             Specifies the command to use to connect to the server.  The com-
              mand string extends to the end of the line, and is executed with
-             /bin/sh.  In the command string, `%h' will be substituted by the
+             ^[[4m/bin/sh^[[24m.  In the command string, `%h' will be substituted by the
              host name to connect and `%p' by the port.  The command can be
              basically anything, and should read from its standard input and
              write to its standard output.  It should eventually connect an
-             sshd(8) server running on some machine, or execute sshd -i someM--
+             sshd(8) server running on some machine, or execute ^[[1msshd -i ^[[22msome-
              where.  Host key management will be done using the HostName of
              the host being connected (defaulting to the name typed by the
-             user).  Note that CheckHostIP is not available for connects with
+             user).  Note that ^[[1mCheckHostIP ^[[22mis not available for connects with
              a proxy command.
 
-     PubkeyAuthentication
+     ^[[1mPubkeyAuthentication^[[0m
              Specifies whether to try public key authentication.  The argument
              to this keyword must be ``yes'' or ``no''.  The default is
              ``yes''.  This option applies to protocol version 2 only.
 
-     RemoteForward
+     ^[[1mRemoteForward^[[0m
              Specifies that a TCP/IP port on the remote machine be forwarded
              over the secure channel to the specified host and port from the
              local machine.  The first argument must be a port number, and the
-             second must be host:port.  IPv6 addresses can be specified with
-             an alternative syntax: host/port.  Multiple forwardings may be
+             second must be ^[[4mhost:port^[[24m.  IPv6 addresses can be specified with
+             an alternative syntax: ^[[4mhost/port^[[24m.  Multiple forwardings may be
              specified, and additional forwardings can be given on the command
              line.  Only the superuser can forward privileged ports.
 
-     RhostsAuthentication
+     ^[[1mRhostsAuthentication^[[0m
              Specifies whether to try rhosts based authentication.  Note that
              this declaration only affects the client side and has no effect
-             whatsoever on security.  Most servers do not permit RhostsAuthenM--
-             tication because it is not secure (see RhostsRSAAuthentication).
+             whatsoever on security.  Most servers do not permit RhostsAuthen-
+             tication because it is not secure (see ^[[1mRhostsRSAAuthentication^[[22m).
              The argument to this keyword must be ``yes'' or ``no''.  The
              default is ``no''.  This option applies to protocol version 1
-             only and requires ssh to be setuid root and UsePrivilegedPort to
+             only and requires ^[[1mssh ^[[22mto be setuid root and ^[[1mUsePrivilegedPort ^[[22mto
              be set to ``yes''.
 
-     RhostsRSAAuthentication
+     ^[[1mRhostsRSAAuthentication^[[0m
              Specifies whether to try rhosts based authentication with RSA
              host authentication.  The argument must be ``yes'' or ``no''.
              The default is ``no''.  This option applies to protocol version 1
-             only and requires ssh to be setuid root.
+             only and requires ^[[1mssh ^[[22mto be setuid root.
 
-     RSAAuthentication
+     ^[[1mRSAAuthentication^[[0m
              Specifies whether to try RSA authentication.  The argument to
              this keyword must be ``yes'' or ``no''.  RSA authentication will
-             only be attempted if the identity file exists, or an authenticaM--
+             only be attempted if the identity file exists, or an authentica-
              tion agent is running.  The default is ``yes''.  Note that this
              option applies to protocol version 1 only.
 
-     SmartcardDevice
+     ^[[1mSmartcardDevice^[[0m
              Specifies which smartcard device to use. The argument to this
-             keyword is the device ssh should use to communicate with a smartM--
+             keyword is the device ^[[1mssh ^[[22mshould use to communicate with a smart-
              card used for storing the user's private RSA key. By default, no
              device is specified and smartcard support is not activated.
 
-     StrictHostKeyChecking
-             If this flag is set to ``yes'', ssh will never automatically add
-             host keys to the $HOME/.ssh/known_hosts file, and refuses to conM--
+     ^[[1mStrictHostKeyChecking^[[0m
+             If this flag is set to ``yes'', ^[[1mssh ^[[22mwill never automatically add
+             host keys to the ^[[4m$HOME/.ssh/known_hosts^[[24m file, and refuses to con-
              nect to hosts whose host key has changed.  This provides maximum
              protection against trojan horse attacks, however, can be annoying
-             when the /etc/ssh/ssh_known_hosts file is poorly maintained, or
+             when the ^[[4m/etc/ssh/ssh_known_hosts^[[24m file is poorly maintained, or
              connections to new hosts are frequently made.  This option forces
              the user to manually add all new hosts.  If this flag is set to
-             ``no'', ssh will automatically add new host keys to the user
+             ``no'', ^[[1mssh ^[[22mwill automatically add new host keys to the user
              known hosts files.  If this flag is set to ``ask'', new host keys
              will be added to the user known host files only after the user
-             has confirmed that is what they really want to do, and ssh will
+             has confirmed that is what they really want to do, and ^[[1mssh ^[[22mwill
              refuse to connect to hosts whose host key has changed.  The host
              keys of known hosts will be verified automatically in all cases.
              The argument must be ``yes'', ``no'' or ``ask''.  The default is
              ``ask''.
 
-     UsePrivilegedPort
-             Specifies whether to use a privileged port for outgoing connecM--
+     ^[[1mUsePrivilegedPort^[[0m
+             Specifies whether to use a privileged port for outgoing connec-
              tions.  The argument must be ``yes'' or ``no''.  The default is
-             ``no''.  If set to ``yes'' ssh must be setuid root.  Note that
-             this option must be set to ``yes'' if RhostsAuthentication and
-             RhostsRSAAuthentication authentications are needed with older
+             ``no''.  If set to ``yes'' ^[[1mssh ^[[22mmust be setuid root.  Note that
+             this option must be set to ``yes'' if ^[[1mRhostsAuthentication ^[[22mand
+             ^[[1mRhostsRSAAuthentication ^[[22mauthentications are needed with older
              servers.
 
-     User    Specifies the user to log in as.  This can be useful when a difM--
+     ^[[1mUser    ^[[22mSpecifies the user to log in as.  This can be useful when a dif-
              ferent user name is used on different machines.  This saves the
-             trouble of having to remember to give the user name on the comM--
+             trouble of having to remember to give the user name on the com-
              mand line.
 
-     UserKnownHostsFile
+     ^[[1mUserKnownHostsFile^[[0m
              Specifies a file to use for the user host key database instead of
-             $HOME/.ssh/known_hosts.
+             ^[[4m$HOME/.ssh/known_hosts^[[24m.
 
-     XAuthLocation
+     ^[[1mXAuthLocation^[[0m
              Specifies the full pathname of the xauth(1) program.  The default
-             is /usr/X11R6/bin/xauth.
+             is ^[[4m/usr/X11R6/bin/xauth^[[24m.
 
-FILES
+^[[1mFILES^[[0m
      $HOME/.ssh/config
              This is the per-user configuration file.  The format of this file
-             is described above.  This file is used by the ssh client.  This
+             is described above.  This file is used by the ^[[1mssh ^[[22mclient.  This
              file does not usually contain any sensitive information, but the
              recommended permissions are read/write for the user, and not
              accessible by others.
@@ -390,14 +390,14 @@
              file, and for those users who do not have a configuration file.
              This file must be world-readable.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      OpenSSH is a derivative of the original and free ssh 1.2.12 release by
      Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
-     de Raadt and Dug Song removed many bugs, re-added newer features and creM--
+     de Raadt and Dug Song removed many bugs, re-added newer features and cre-
      ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      ssh(1)
 
 BSD                           September 25, 1999                           BSD
diff -ru openssh-3.5p1.orig/sshd.0 openssh-3.5p1/sshd.0
--- openssh-3.5p1.orig/sshd.0	2002-10-04 11:31:45.000000000 +1000
+++ openssh-3.5p1/sshd.0	2003-03-12 21:15:25.000000000 +1100
@@ -1,28 +1,28 @@
-SSHD(8)                     System Manager's Manual                    SSHD(8)
+SSHD(8)                   BSD System Manager's Manual                  SSHD(8)
 
-NAME
-     sshd - OpenSSH SSH daemon
+^[[1mNAME^[[0m
+     ^[[1msshd ^[[22m- OpenSSH SSH daemon
 
-SYNOPSIS
-     sshd [-deiqtD46] [-b bits] [-f config_file] [-g login_grace_time]
-          [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len]
+^[[1mSYNOPSIS^[[0m
+     ^[[1msshd ^[[22m[^[[1m-deiqtD46^[[22m] [^[[1m-b ^[[4m^[[22mbits^[[24m] [^[[1m-f ^[[4m^[[22mconfig_file^[[24m] [^[[1m-g ^[[4m^[[22mlogin_grace_time^[[24m]
+          [^[[1m-h ^[[4m^[[22mhost_key_file^[[24m] [^[[1m-k ^[[4m^[[22mkey_gen_time^[[24m] [^[[1m-o ^[[4m^[[22moption^[[24m] [^[[1m-p ^[[4m^[[22mport^[[24m] [^[[1m-u ^[[4m^[[22mlen^[[24m]
 
-DESCRIPTION
-     sshd (SSH Daemon) is the daemon program for ssh(1).  Together these proM--
+^[[1mDESCRIPTION^[[0m
+     ^[[1msshd ^[[22m(SSH Daemon) is the daemon program for ssh(1).  Together these pro-
      grams replace rlogin and rsh, and provide secure encrypted communications
      between two untrusted hosts over an insecure network.  The programs are
      intended to be as easy to install and use as possible.
 
-     sshd is the daemon that listens for connections from clients.  It is norM--
-     mally started at boot from /etc/rc.  It forks a new daemon for each
+     ^[[1msshd ^[[22mis the daemon that listens for connections from clients.  It is nor-
+     mally started at boot from ^[[4m/etc/rc^[[24m.  It forks a new daemon for each
      incoming connection.  The forked daemons handle key exchange, encryption,
-     authentication, command execution, and data exchange.  This implementaM--
-     tion of sshd supports both SSH protocol version 1 and 2 simultaneously.
-     sshd works as follows.
+     authentication, command execution, and data exchange.  This implementa-
+     tion of ^[[1msshd ^[[22msupports both SSH protocol version 1 and 2 simultaneously.
+     ^[[1msshd ^[[22mworks as follows.
 
-   SSH protocol version 1
+   ^[[1mSSH protocol version 1^[[0m
 
-     Each host has a host-specific RSA key (normally 1024 bits) used to idenM--
+     Each host has a host-specific RSA key (normally 1024 bits) used to iden-
      tify the host.  Additionally, when the daemon starts, it generates a
      server RSA key (normally 768 bits).  This key is normally regenerated
      every hour if it has been used, and is never stored on disk.
@@ -35,20 +35,20 @@
      server.  Both sides then use this random number as a session key which is
      used to encrypt all further communications in the session.  The rest of
      the session is encrypted using a conventional cipher, currently Blowfish
-     or 3DES, with 3DES being used by default.  The client selects the encrypM--
+     or 3DES, with 3DES being used by default.  The client selects the encryp-
      tion algorithm to use from those offered by the server.
 
      Next, the server and the client enter an authentication dialog.  The
-     client tries to authenticate itself using .rhosts authentication, .rhosts
+     client tries to authenticate itself using ^[[4m.rhosts^[[24m authentication, ^[[4m.rhosts^[[0m
      authentication combined with RSA host authentication, RSA challenge-
      response authentication, or password based authentication.
 
      Rhosts authentication is normally disabled because it is fundamentally
      insecure, but can be enabled in the server configuration file if desired.
-     System security is not improved unless rshd, rlogind, and rexecd are disM--
+     System security is not improved unless ^[[1mrshd^[[22m, ^[[1mrlogind^[[22m, and rexecd are dis-
      abled (thus completely disabling rlogin and rsh into the machine).
 
-   SSH protocol version 2
+   ^[[1mSSH protocol version 2^[[0m
 
      Version 2 works similarly: Each host has a host-specific key (RSA or DSA)
      used to identify the host.  However, when the daemon starts, it does not
@@ -63,12 +63,12 @@
      through a cryptographic message authentication code (hmac-sha1 or hmac-
      md5).
 
-     Protocol version 2 provides a public key based user (PubkeyAuthenticaM--
+     Protocol version 2 provides a public key based user (PubkeyAuthentica-
      tion) or client host (HostbasedAuthentication) authentication method,
-     conventional password authentication and challenge response based methM--
+     conventional password authentication and challenge response based meth-
      ods.
 
-   Command execution and data forwarding
+   ^[[1mCommand execution and data forwarding^[[0m
 
      If the client successfully authenticates itself, a dialog for preparing
      the session is entered.  At this time the client may request things like
@@ -81,176 +81,176 @@
      data at any time, and such data is forwarded to/from the shell or command
      on the server side, and the user terminal in the client side.
 
-     When the user program terminates and all forwarded X11 and other connecM--
+     When the user program terminates and all forwarded X11 and other connec-
      tions have been closed, the server sends command exit status to the
      client, and both sides exit.
 
-     sshd can be configured using command-line options or a configuration
-     file.  Command-line options override values specified in the configuraM--
+     ^[[1msshd ^[[22mcan be configured using command-line options or a configuration
+     file.  Command-line options override values specified in the configura-
      tion file.
 
-     sshd rereads its configuration file when it receives a hangup signal,
+     ^[[1msshd ^[[22mrereads its configuration file when it receives a hangup signal,
      SIGHUP, by executing itself with the name it was started as, i.e.,
-     /usr/sbin/sshd.
+     ^[[4m/usr/sbin/sshd^[[24m.
 
      The options are as follows:
 
-     -b bits
+     ^[[1m-b ^[[4m^[[22mbits^[[0m
              Specifies the number of bits in the ephemeral protocol version 1
              server key (default 768).
 
-     -d      Debug mode.  The server sends verbose debug output to the system
+     ^[[1m-d      ^[[22mDebug mode.  The server sends verbose debug output to the system
              log, and does not put itself in the background.  The server also
              will not fork and will only process one connection.  This option
              is only intended for debugging for the server.  Multiple -d
              options increase the debugging level.  Maximum is 3.
 
-     -e      When this option is specified, sshd will send the output to the
+     ^[[1m-e      ^[[22mWhen this option is specified, ^[[1msshd ^[[22mwill send the output to the
              standard error instead of the system log.
 
-     -f configuration_file
+     ^[[1m-f ^[[4m^[[22mconfiguration_file^[[0m
              Specifies the name of the configuration file.  The default is
-             /etc/ssh/sshd_config.  sshd refuses to start if there is no conM--
+             ^[[4m/etc/ssh/sshd_config^[[24m.  ^[[1msshd ^[[22mrefuses to start if there is no con-
              figuration file.
 
-     -g login_grace_time
+     ^[[1m-g ^[[4m^[[22mlogin_grace_time^[[0m
              Gives the grace time for clients to authenticate themselves
              (default 120 seconds).  If the client fails to authenticate the
              user within this many seconds, the server disconnects and exits.
              A value of zero indicates no limit.
 
-     -h host_key_file
+     ^[[1m-h ^[[4m^[[22mhost_key_file^[[0m
              Specifies a file from which a host key is read.  This option must
-             be given if sshd is not run as root (as the normal host key files
+             be given if ^[[1msshd ^[[22mis not run as root (as the normal host key files
              are normally not readable by anyone but root).  The default is
-             /etc/ssh/ssh_host_key for protocol version 1, and
-             /etc/ssh/ssh_host_rsa_key and /etc/ssh/ssh_host_dsa_key for proM--
+             ^[[4m/etc/ssh/ssh_host_key^[[24m for protocol version 1, and
+             ^[[4m/etc/ssh/ssh_host_rsa_key^[[24m and ^[[4m/etc/ssh/ssh_host_dsa_key^[[24m for pro-
              tocol version 2.  It is possible to have multiple host key files
              for the different protocol versions and host key algorithms.
 
-     -i      Specifies that sshd is being run from inetd.  sshd is normally
+     ^[[1m-i      ^[[22mSpecifies that ^[[1msshd ^[[22mis being run from inetd.  ^[[1msshd ^[[22mis normally
              not run from inetd because it needs to generate the server key
              before it can respond to the client, and this may take tens of
              seconds.  Clients would have to wait too long if the key was
              regenerated every time.  However, with small key sizes (e.g.,
-             512) using sshd from inetd may be feasible.
+             512) using ^[[1msshd ^[[22mfrom inetd may be feasible.
 
-     -k key_gen_time
+     ^[[1m-k ^[[4m^[[22mkey_gen_time^[[0m
              Specifies how often the ephemeral protocol version 1 server key
-             is regenerated (default 3600 seconds, or one hour).  The motivaM--
+             is regenerated (default 3600 seconds, or one hour).  The motiva-
              tion for regenerating the key fairly often is that the key is not
              stored anywhere, and after about an hour, it becomes impossible
              to recover the key for decrypting intercepted communications even
              if the machine is cracked into or physically seized.  A value of
              zero indicates that the key will never be regenerated.
 
-     -o option
-             Can be used to give options in the format used in the configuraM--
+     ^[[1m-o ^[[4m^[[22moption^[[0m
+             Can be used to give options in the format used in the configura-
              tion file.  This is useful for specifying options for which there
              is no separate command-line flag.
 
-     -p port
+     ^[[1m-p ^[[4m^[[22mport^[[0m
              Specifies the port on which the server listens for connections
-             (default 22).  Multiple port options are permitted.  Ports speciM--
+             (default 22).  Multiple port options are permitted.  Ports speci-
              fied in the configuration file are ignored when a command-line
              port is specified.
 
-     -q      Quiet mode.  Nothing is sent to the system log.  Normally the
+     ^[[1m-q      ^[[22mQuiet mode.  Nothing is sent to the system log.  Normally the
              beginning, authentication, and termination of each connection is
              logged.
 
-     -t      Test mode.  Only check the validity of the configuration file and
-             sanity of the keys.  This is useful for updating sshd reliably as
+     ^[[1m-t      ^[[22mTest mode.  Only check the validity of the configuration file and
+             sanity of the keys.  This is useful for updating ^[[1msshd ^[[22mreliably as
              configuration options may change.
 
-     -u len  This option is used to specify the size of the field in the utmp
+     ^[[1m-u ^[[4m^[[22mlen^[[24m  This option is used to specify the size of the field in the utmp
              structure that holds the remote host name.  If the resolved host
-             name is longer than len, the dotted decimal value will be used
-             instead.  This allows hosts with very long host names that overM--
-             flow this field to still be uniquely identified.  Specifying -u0
+             name is longer than ^[[4mlen^[[24m, the dotted decimal value will be used
+             instead.  This allows hosts with very long host names that over-
+             flow this field to still be uniquely identified.  Specifying ^[[1m-u0^[[0m
              indicates that only dotted decimal addresses should be put into
-             the utmp file.  -u0 is also be used to prevent sshd from making
+             the ^[[4mutmp^[[24m file.  ^[[1m-u0 ^[[22mis also be used to prevent ^[[1msshd ^[[22mfrom making
              DNS requests unless the authentication mechanism or configuration
              requires it.  Authentication mechanisms that may require DNS
-             include RhostsAuthentication, RhostsRSAAuthentication,
-             HostbasedAuthentication and using a from="pattern-list" option in
+             include ^[[1mRhostsAuthentication^[[22m, ^[[1mRhostsRSAAuthentication^[[22m,
+             ^[[1mHostbasedAuthentication ^[[22mand using a ^[[1mfrom="pattern-list" ^[[22moption in
              a key file.  Configuration options that require DNS include using
-             a USER@HOST pattern in AllowUsers or DenyUsers.
+             a USER@HOST pattern in ^[[1mAllowUsers ^[[22mor ^[[1mDenyUsers^[[22m.
 
-     -D      When this option is specified sshd will not detach and does not
-             become a daemon.  This allows easy monitoring of sshd.
+     ^[[1m-D      ^[[22mWhen this option is specified ^[[1msshd ^[[22mwill not detach and does not
+             become a daemon.  This allows easy monitoring of ^[[1msshd^[[22m.
 
-     -4      Forces sshd to use IPv4 addresses only.
+     ^[[1m-4      ^[[22mForces ^[[1msshd ^[[22mto use IPv4 addresses only.
 
-     -6      Forces sshd to use IPv6 addresses only.
+     ^[[1m-6      ^[[22mForces ^[[1msshd ^[[22mto use IPv6 addresses only.
 
-CONFIGURATION FILE
-     sshd reads configuration data from /etc/ssh/sshd_config (or the file
-     specified with -f on the command line).  The file format and configuraM--
+^[[1mCONFIGURATION FILE^[[0m
+     ^[[1msshd ^[[22mreads configuration data from ^[[4m/etc/ssh/sshd_config^[[24m (or the file
+     specified with ^[[1m-f ^[[22mon the command line).  The file format and configura-
      tion options are described in sshd_config(5).
 
-LOGIN PROCESS
-     When a user successfully logs in, sshd does the following:
+^[[1mLOGIN PROCESS^[[0m
+     When a user successfully logs in, ^[[1msshd ^[[22mdoes the following:
 
            1.   If the login is on a tty, and no command has been specified,
-                prints last login time and /etc/motd (unless prevented in the
-                configuration file or by $HOME/.hushlogin; see the FILES secM--
+                prints last login time and ^[[4m/etc/motd^[[24m (unless prevented in the
+                configuration file or by ^[[4m$HOME/.hushlogin^[[24m; see the ^[[4mFILES^[[24m sec-
                 tion).
 
            2.   If the login is on a tty, records login time.
 
-           3.   Checks /etc/nologin; if it exists, prints contents and quits
+           3.   Checks ^[[4m/etc/nologin^[[24m; if it exists, prints contents and quits
                 (unless root).
 
            4.   Changes to run with normal user privileges.
 
            5.   Sets up basic environment.
 
-           6.   Reads $HOME/.ssh/environment if it exists and users are
+           6.   Reads ^[[4m$HOME/.ssh/environment^[[24m if it exists and users are
                 allowed to change their environment.  See the
-                PermitUserEnvironment option in sshd_config(5).
+                ^[[1mPermitUserEnvironment ^[[22moption in sshd_config(5).
 
            7.   Changes to user's home directory.
 
-           8.   If $HOME/.ssh/rc exists, runs it; else if /etc/ssh/sshrc
+           8.   If ^[[4m$HOME/.ssh/rc^[[24m exists, runs it; else if ^[[4m/etc/ssh/sshrc^[[0m
                 exists, runs it; otherwise runs xauth.  The ``rc'' files are
                 given the X11 authentication protocol and cookie in standard
                 input.
 
            9.   Runs user's shell or command.
 
-AUTHORIZED_KEYS FILE FORMAT
-     $HOME/.ssh/authorized_keys is the default file that lists the public keys
+^[[1mAUTHORIZED_KEYS FILE FORMAT^[[0m
+     ^[[4m$HOME/.ssh/authorized_keys^[[24m is the default file that lists the public keys
      that are permitted for RSA authentication in protocol version 1 and for
      public key authentication (PubkeyAuthentication) in protocol version 2.
-     AuthorizedKeysFile may be used to specify an alternative file.
+     ^[[1mAuthorizedKeysFile ^[[22mmay be used to specify an alternative file.
 
      Each line of the file contains one key (empty lines and lines starting
      with a `#' are ignored as comments).  Each RSA public key consists of the
      following fields, separated by spaces: options, bits, exponent, modulus,
-     comment.  Each protocol version 2 public key consists of: options, keyM--
+     comment.  Each protocol version 2 public key consists of: options, key-
      type, base64 encoded key, comment.  The options field is optional; its
      presence is determined by whether the line starts with a number or not
-     (the options field never starts with a number).  The bits, exponent, modM--
-     ulus and comment fields give the RSA key for protocol version 1; the comM--
+     (the options field never starts with a number).  The bits, exponent, mod-
+     ulus and comment fields give the RSA key for protocol version 1; the com-
      ment field is not used for anything (but may be convenient for the user
      to identify the key).  For protocol version 2 the keytype is ``ssh-dss''
      or ``ssh-rsa''.
 
      Note that lines in this file are usually several hundred bytes long
      (because of the size of the public key encoding).  You don't want to type
-     them in; instead, copy the identity.pub, id_dsa.pub or the id_rsa.pub
+     them in; instead, copy the ^[[4midentity.pub^[[24m, ^[[4mid_dsa.pub^[[24m or the ^[[4mid_rsa.pub^[[0m
      file and edit it.
 
-     sshd enforces a minimum RSA key modulus size for protocol 1 and protocol
+     ^[[1msshd ^[[22menforces a minimum RSA key modulus size for protocol 1 and protocol
      2 keys of 768 bits.
 
-     The options (if present) consist of comma-separated option specificaM--
-     tions.  No spaces are permitted, except within double quotes.  The folM--
+     The options (if present) consist of comma-separated option specifica-
+     tions.  No spaces are permitted, except within double quotes.  The fol-
      lowing option specifications are supported (note that option keywords are
      case-insensitive):
 
-     from="pattern-list"
+     ^[[1mfrom="pattern-list"^[[0m
              Specifies that in addition to public key authentication, the
              canonical name of the remote host must be present in the comma-
              separated list of patterns (`*' and `'?  serve as wildcards).
@@ -258,20 +258,20 @@
              `'!; if the canonical host name matches a negated pattern, the
              key is not accepted.  The purpose of this option is to optionally
              increase security: public key authentication by itself does not
-             trust the network or name servers or anything (but the key); howM--
+             trust the network or name servers or anything (but the key); how-
              ever, if somebody somehow steals the key, the key permits an
              intruder to log in from anywhere in the world.  This additional
              option makes using a stolen key more difficult (name servers
              and/or routers would have to be compromised in addition to just
              the key).
 
-     command="command"
+     ^[[1mcommand="command"^[[0m
              Specifies that the command is executed whenever this key is used
              for authentication.  The command supplied by the user (if any) is
              ignored.  The command is run on a pty if the client requests a
              pty; otherwise it is run without a tty.  If a 8-bit clean channel
-             is required, one must not request a pty or should specify no-pty.
-             A quote may be included in the command by quoting it with a backM--
+             is required, one must not request a pty or should specify ^[[1mno-pty^[[22m.
+             A quote may be included in the command by quoting it with a back-
              slash.  This option might be useful to restrict certain public
              keys to perform just a specific operation.  An example might be a
              key that permits remote backups but nothing else.  Note that the
@@ -279,39 +279,39 @@
              explicitly prohibited.  Note that this option applies to shell,
              command or subsystem execution.
 
-     environment="NAME=value"
+     ^[[1menvironment="NAME=value"^[[0m
              Specifies that the string is to be added to the environment when
              logging in using this key.  Environment variables set this way
              override other default environment values.  Multiple options of
              this type are permitted.  Environment processing is disabled by
-             default and is controlled via the PermitUserEnvironment option.
-             This option is automatically disabled if UseLogin is enabled.
+             default and is controlled via the ^[[1mPermitUserEnvironment ^[[22moption.
+             This option is automatically disabled if ^[[1mUseLogin ^[[22mis enabled.
 
-     no-port-forwarding
-             Forbids TCP/IP forwarding when this key is used for authenticaM--
+     ^[[1mno-port-forwarding^[[0m
+             Forbids TCP/IP forwarding when this key is used for authentica-
              tion.  Any port forward requests by the client will return an
-             error.  This might be used, e.g., in connection with the command
+             error.  This might be used, e.g., in connection with the ^[[1mcommand^[[0m
              option.
 
-     no-X11-forwarding
+     ^[[1mno-X11-forwarding^[[0m
              Forbids X11 forwarding when this key is used for authentication.
              Any X11 forward requests by the client will return an error.
 
-     no-agent-forwarding
+     ^[[1mno-agent-forwarding^[[0m
              Forbids authentication agent forwarding when this key is used for
              authentication.
 
-     no-pty  Prevents tty allocation (a request to allocate a pty will fail).
+     ^[[1mno-pty  ^[[22mPrevents tty allocation (a request to allocate a pty will fail).
 
-     permitopen="host:port"
-             Limit local ``ssh -L'' port forwarding such that it may only conM--
-             nect to the specified host and port.  IPv6 addresses can be specM--
-             ified with an alternative syntax: host/port.  Multiple permitopen
+     ^[[1mpermitopen="host:port"^[[0m
+             Limit local ``ssh -L'' port forwarding such that it may only con-
+             nect to the specified host and port.  IPv6 addresses can be spec-
+             ified with an alternative syntax: ^[[4mhost/port^[[24m.  Multiple ^[[1mpermitopen^[[0m
              options may be applied separated by commas. No pattern matching
              is performed on the specified hostnames, they must be literal
              domains or addresses.
 
-   Examples
+   ^[[1mExamples^[[0m
      1024 33 12121...312314325 ylo@foo.bar
 
      from="*.niksula.hut.fi,!pc.niksula.hut.fi" 1024 35 23...2334 ylo@niksula
@@ -321,8 +321,8 @@
 
      permitopen="10.2.1.55:80",permitopen="10.2.1.56:25" 1024 33 23...2323
 
-SSH_KNOWN_HOSTS FILE FORMAT
-     The /etc/ssh/ssh_known_hosts, and $HOME/.ssh/known_hosts files contain
+^[[1mSSH_KNOWN_HOSTS FILE FORMAT^[[0m
+     The ^[[4m/etc/ssh/ssh_known_hosts^[[24m, and ^[[4m$HOME/.ssh/known_hosts^[[24m files contain
      host public keys for all known hosts.  The global file should be prepared
      by the administrator (optional), and the per-user file is maintained
      automatically: whenever the user connects from an unknown host its key is
@@ -331,7 +331,7 @@
      Each line in these files contains the following fields: hostnames, bits,
      exponent, modulus, comment.  The fields are separated by spaces.
 
-     Hostnames is a comma-separated list of patterns ('*' and '?' act as wildM--
+     Hostnames is a comma-separated list of patterns ('*' and '?' act as wild-
      cards); each pattern in turn is matched against the canonical host name
      (when authenticating a client) or against the user-supplied name (when
      authenticating a server).  A pattern may also be preceded by `'!  to
@@ -339,39 +339,39 @@
      accepted (by that line) even if it matched another pattern on the line.
 
      Bits, exponent, and modulus are taken directly from the RSA host key;
-     they can be obtained, e.g., from /etc/ssh/ssh_host_key.pub.  The optional
+     they can be obtained, e.g., from ^[[4m/etc/ssh/ssh_host_key.pub^[[24m.  The optional
      comment field continues to the end of the line, and is not used.
 
      Lines starting with `#' and empty lines are ignored as comments.
 
      When performing host authentication, authentication is accepted if any
-     matching line has the proper key.  It is thus permissible (but not recomM--
+     matching line has the proper key.  It is thus permissible (but not recom-
      mended) to have several lines or different host keys for the same names.
      This will inevitably happen when short forms of host names from different
-     domains are put in the file.  It is possible that the files contain conM--
+     domains are put in the file.  It is possible that the files contain con-
      flicting information; authentication is accepted if valid information can
      be found from either file.
 
      Note that the lines in these files are typically hundreds of characters
      long, and you definitely don't want to type in the host keys by hand.
-     Rather, generate them by a script or by taking /etc/ssh/ssh_host_key.pub
+     Rather, generate them by a script or by taking ^[[4m/etc/ssh/ssh_host_key.pub^[[0m
      and adding the host names at the front.
 
-   Examples
+   ^[[1mExamples^[[0m
 
      closenet,...,130.233.208.41 1024 37 159...93 closenet.hut.fi
      cvs.openbsd.org,199.185.137.3 ssh-rsa AAAA1234.....=
 
-FILES
+^[[1mFILES^[[0m
      /etc/ssh/sshd_config
-             Contains configuration data for sshd.  The file format and conM--
+             Contains configuration data for ^[[1msshd^[[22m.  The file format and con-
              figuration options are described in sshd_config(5).
 
      /etc/ssh/ssh_host_key, /etc/ssh/ssh_host_dsa_key,
              /etc/ssh/ssh_host_rsa_key
              These three files contain the private parts of the host keys.
              These files should only be owned by root, readable only by root,
-             and not accessible to others.  Note that sshd does not start if
+             and not accessible to others.  Note that ^[[1msshd ^[[22mdoes not start if
              this file is group/world-accessible.
 
      /etc/ssh/ssh_host_key.pub, /etc/ssh/ssh_host_dsa_key.pub,
@@ -388,16 +388,16 @@
              Exchange".  The file format is described in moduli(5).
 
      /var/empty
-             chroot(2) directory used by sshd during privilege separation in
+             chroot(2) directory used by ^[[1msshd ^[[22mduring privilege separation in
              the pre-authentication phase.  The directory should not contain
              any files and must be owned by root and not group or world-
              writable.
 
      /var/run/sshd.pid
-             Contains the process ID of the sshd listening for connections (if
+             Contains the process ID of the ^[[1msshd ^[[22mlistening for connections (if
              there are several daemons running concurrently for different
              ports, this contains the process ID of the one started last).
-             The content of this file is not sensitive; it can be world-readM--
+             The content of this file is not sensitive; it can be world-read-
              able.
 
      $HOME/.ssh/authorized_keys
@@ -407,21 +407,21 @@
              home directory resides on an NFS volume).  It is recommended that
              it not be accessible by others.  The format of this file is
              described above.  Users will place the contents of their
-             identity.pub, id_dsa.pub and/or id_rsa.pub files into this file,
+             ^[[4midentity.pub^[[24m, ^[[4mid_dsa.pub^[[24m and/or ^[[4mid_rsa.pub^[[24m files into this file,
              as described in ssh-keygen(1).
 
      /etc/ssh/ssh_known_hosts and $HOME/.ssh/known_hosts
-             These files are consulted when using rhosts with RSA host authenM--
+             These files are consulted when using rhosts with RSA host authen-
              tication or protocol version 2 hostbased authentication to check
              the public key of the host.  The key must be listed in one of
              these files to be accepted.  The client uses the same files to
              verify that it is connecting to the correct remote host.  These
              files should be writable only by root/the owner.
-             /etc/ssh/ssh_known_hosts should be world-readable, and
-             $HOME/.ssh/known_hosts can but need not be world-readable.
+             ^[[4m/etc/ssh/ssh_known_hosts^[[24m should be world-readable, and
+             ^[[4m$HOME/.ssh/known_hosts^[[24m can but need not be world-readable.
 
      /etc/nologin
-             If this file exists, sshd refuses to let anyone except root log
+             If this file exists, ^[[1msshd ^[[22mrefuses to let anyone except root log
              in.  The contents of the file are displayed to anyone trying to
              log in, and non-root connections are refused.  The file should be
              world-readable.
@@ -434,7 +434,7 @@
              This file contains host-username pairs, separated by a space, one
              per line.  The given user on the corresponding host is permitted
              to log in without password.  The same file is used by rlogind and
-             rshd.  The file must be writable only by the user; it is recomM--
+             rshd.  The file must be writable only by the user; it is recom-
              mended that it not be accessible by others.
 
              If is also possible to use netgroups in the file.  Either host or
@@ -442,17 +442,17 @@
              all users in the group.
 
      $HOME/.shosts
-             For ssh, this file is exactly the same as for .rhosts.  However,
+             For ssh, this file is exactly the same as for ^[[4m.rhosts^[[24m.  However,
              this file is not used by rlogin and rshd, so using this permits
              access using SSH only.
 
      /etc/hosts.equiv
-             This file is used during .rhosts authentication.  In the simplest
+             This file is used during ^[[4m.rhosts^[[24m authentication.  In the simplest
              form, this file contains host names, one per line.  Users on
              those hosts are permitted to log in without a password, provided
              they have the same user name on both machines.  The host name may
              also be followed by a user name; such users are permitted to log
-             in as any user on this machine (except root).  Additionally, the
+             in as ^[[4many^[[24m user on this machine (except root).  Additionally, the
              syntax ``+@group'' can be used to specify netgroups.  Negated
              entries start with `-'.
 
@@ -462,9 +462,9 @@
              authentication is normally required.  This file must be writable
              only by root; it is recommended that it be world-readable.
 
-             Warning: It is almost never a good idea to use user names in
-             hosts.equiv.  Beware that it really means that the named user(s)
-             can log in as anybody, which includes bin, daemon, adm, and other
+             ^[[1mWarning: It is almost never a good idea to use user names in^[[0m
+             ^[[4mhosts.equiv^[[24m.  Beware that it really means that the named user(s)
+             can log in as ^[[4manybody^[[24m, which includes bin, daemon, adm, and other
              accounts that own critical binaries and directories.  Using a
              user name practically grants the user root access.  The only
              valid use for user names that I can think of is in negative
@@ -473,7 +473,7 @@
              Note that this warning also applies to rsh/rlogin.
 
      /etc/shosts.equiv
-             This is processed exactly as /etc/hosts.equiv.  However, this
+             This is processed exactly as ^[[4m/etc/hosts.equiv^[[24m.  However, this
              file may be useful in environments that want to run both
              rsh/rlogin and ssh.
 
@@ -483,20 +483,20 @@
              `#'), and assignment lines of the form name=value.  The file
              should be writable only by the user; it need not be readable by
              anyone else.  Environment processing is disabled by default and
-             is controlled via the PermitUserEnvironment option.
+             is controlled via the ^[[1mPermitUserEnvironment ^[[22moption.
 
      $HOME/.ssh/rc
              If this file exists, it is run with /bin/sh after reading the
-             environment files but before starting the user's shell or comM--
+             environment files but before starting the user's shell or com-
              mand.  It must not produce any output on stdout; stderr must be
              used instead.  If X11 forwarding is in use, it will receive the
              "proto cookie" pair in its standard input (and DISPLAY in its
-             environment).  The script must call xauth(1) because sshd will
+             environment).  The script must call xauth(1) because ^[[1msshd ^[[22mwill
              not run xauth automatically to add X11 cookies.
 
              The primary purpose of this file is to run any initialization
              routines which may be needed before the user's home directory
-             becomes accessible; AFS is a particular example of such an enviM--
+             becomes accessible; AFS is a particular example of such an envi-
              ronment.
 
              This file will probably contain some initialization code followed
@@ -513,35 +513,35 @@
                      fi | xauth -q -
              fi
 
-             If this file does not exist, /etc/ssh/sshrc is run, and if that
+             If this file does not exist, ^[[4m/etc/ssh/sshrc^[[24m is run, and if that
              does not exist either, xauth is used to add the cookie.
 
              This file should be writable only by the user, and need not be
              readable by anyone else.
 
      /etc/ssh/sshrc
-             Like $HOME/.ssh/rc.  This can be used to specify machine-specific
+             Like ^[[4m$HOME/.ssh/rc^[[24m.  This can be used to specify machine-specific
              login-time initializations globally.  This file should be
              writable only by root, and should be world-readable.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      OpenSSH is a derivative of the original and free ssh 1.2.12 release by
      Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
-     de Raadt and Dug Song removed many bugs, re-added newer features and creM--
+     de Raadt and Dug Song removed many bugs, re-added newer features and cre-
      ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.  Niels Provos and Markus Friedl contributed support
      for privilege separation.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      scp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1), ssh-keygen(1),
      login.conf(5), moduli(5), sshd_config(5), sftp-server(8)
 
-     T. Ylonen, T. Kivinen, M. Saarinen, T. Rinne, and S. Lehtinen, SSH
-     Protocol Architecture, draft-ietf-secsh-architecture-12.txt, January
+     T. Ylonen, T. Kivinen, M. Saarinen, T. Rinne, and S. Lehtinen, ^[[4mSSH^[[0m
+     ^[[4mProtocol^[[24m ^[[4mArchitecture^[[24m, draft-ietf-secsh-architecture-12.txt, January
      2002, work in progress material.
 
-     M. Friedl, N. Provos, and W. A. Simpson, Diffie-Hellman Group Exchange
-     for the SSH Transport Layer Protocol, draft-ietf-secsh-dh-group-
+     M. Friedl, N. Provos, and W. A. Simpson, ^[[4mDiffie-Hellman^[[24m ^[[4mGroup^[[24m ^[[4mExchange^[[0m
+     ^[[4mfor^[[24m ^[[4mthe^[[24m ^[[4mSSH^[[24m ^[[4mTransport^[[24m ^[[4mLayer^[[24m ^[[4mProtocol^[[24m, draft-ietf-secsh-dh-group-
      exchange-02.txt, January 2002, work in progress material.
 
 BSD                           September 25, 1999                           BSD
diff -ru openssh-3.5p1.orig/sshd.c openssh-3.5p1/sshd.c
--- openssh-3.5p1.orig/sshd.c	2002-09-30 11:59:23.000000000 +1000
+++ openssh-3.5p1/sshd.c	2003-03-12 21:10:26.000000000 +1100
@@ -205,6 +205,9 @@
 extern struct monitor *pmonitor;
 extern int use_privsep;
 
+Buffer expire_message; /* "password will expire/has expired" messages */
+Buffer login_message;  /* message to be displayed after login */
+
 /* Prototypes for various functions defined later in this file. */
 void destroy_sensitive_data(void);
 void demote_sensitive_data(void);
@@ -1494,6 +1497,10 @@
 		if ((authctxt = privsep_preauth()) != NULL)
 			goto authenticated;
 
+	/* prepare buffers to collect authentication/expiry messages */
+	buffer_init(&login_message);
+	buffer_init(&expire_message);
+
 	/* perform the key exchange */
 	/* authenticate user and start session */
 	if (compat20) {
diff -ru openssh-3.5p1.orig/sshd_config.0 openssh-3.5p1/sshd_config.0
--- openssh-3.5p1.orig/sshd_config.0	2002-10-04 11:31:46.000000000 +1000
+++ openssh-3.5p1/sshd_config.0	2003-03-12 21:15:28.000000000 +1100
@@ -1,25 +1,25 @@
-SSHD_CONFIG(5)            System File Formats Manual            SSHD_CONFIG(5)
+SSHD_CONFIG(5)              BSD File Formats Manual             SSHD_CONFIG(5)
 
-NAME
-     sshd_config - OpenSSH SSH daemon configuration file
+^[[1mNAME^[[0m
+     ^[[1msshd_config ^[[22m- OpenSSH SSH daemon configuration file
 
-SYNOPSIS
-     /etc/ssh/sshd_config
+^[[1mSYNOPSIS^[[0m
+     ^[[4m/etc/ssh/sshd_config^[[0m
 
-DESCRIPTION
-     sshd reads configuration data from /etc/ssh/sshd_config (or the file
-     specified with -f on the command line).  The file contains keyword-arguM--
+^[[1mDESCRIPTION^[[0m
+     ^[[1msshd ^[[22mreads configuration data from ^[[4m/etc/ssh/sshd_config^[[24m (or the file
+     specified with ^[[1m-f ^[[22mon the command line).  The file contains keyword-argu-
      ment pairs, one per line.  Lines starting with `#' and empty lines are
      interpreted as comments.
 
-     The possible keywords and their meanings are as follows (note that keyM--
+     The possible keywords and their meanings are as follows (note that key-
      words are case-insensitive and arguments are case-sensitive):
 
-     AFSTokenPassing
+     ^[[1mAFSTokenPassing^[[0m
              Specifies whether an AFS token may be forwarded to the server.
              Default is ``no''.
 
-     AllowGroups
+     ^[[1mAllowGroups^[[0m
              This keyword can be followed by a list of group name patterns,
              separated by spaces.  If specified, login is allowed only for
              users whose primary group or supplementary group list matches one
@@ -27,13 +27,13 @@
              patterns.  Only group names are valid; a numerical group ID is
              not recognized.  By default, login is allowed for all groups.
 
-     AllowTcpForwarding
+     ^[[1mAllowTcpForwarding^[[0m
              Specifies whether TCP forwarding is permitted.  The default is
              ``yes''.  Note that disabling TCP forwarding does not improve
              security unless users are also denied shell access, as they can
              always install their own forwarders.
 
-     AllowUsers
+     ^[[1mAllowUsers^[[0m
              This keyword can be followed by a list of user name patterns,
              separated by spaces.  If specified, login is allowed only for
              users names that match one of the patterns.  `*' and `'?  can be
@@ -43,64 +43,64 @@
              then USER and HOST are separately checked, restricting logins to
              particular users from particular hosts.
 
-     AuthorizedKeysFile
+     ^[[1mAuthorizedKeysFile^[[0m
              Specifies the file that contains the public keys that can be used
-             for user authentication.  AuthorizedKeysFile may contain tokens
+             for user authentication.  ^[[1mAuthorizedKeysFile ^[[22mmay contain tokens
              of the form %T which are substituted during connection set-up.
              The following tokens are defined: %% is replaced by a literal
              '%', %h is replaced by the home directory of the user being
              authenticated and %u is replaced by the username of that user.
-             After expansion, AuthorizedKeysFile is taken to be an absolute
+             After expansion, ^[[1mAuthorizedKeysFile ^[[22mis taken to be an absolute
              path or one relative to the user's home directory.  The default
              is ``.ssh/authorized_keys''.
 
-     Banner  In some jurisdictions, sending a warning message before authentiM--
-             cation may be relevant for getting legal protection.  The conM--
+     ^[[1mBanner  ^[[22mIn some jurisdictions, sending a warning message before authenti-
+             cation may be relevant for getting legal protection.  The con-
              tents of the specified file are sent to the remote user before
              authentication is allowed.  This option is only available for
              protocol version 2.  By default, no banner is displayed.
 
-     ChallengeResponseAuthentication
+     ^[[1mChallengeResponseAuthentication^[[0m
              Specifies whether challenge response authentication is allowed.
              All authentication styles from login.conf(5) are supported.  The
              default is ``yes''.
 
-     Ciphers
+     ^[[1mCiphers^[[0m
              Specifies the ciphers allowed for protocol version 2.  Multiple
              ciphers must be comma-separated.  The default is
 
                ``aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
                  aes192-cbc,aes256-cbc''
 
-     ClientAliveInterval
+     ^[[1mClientAliveInterval^[[0m
              Sets a timeout interval in seconds after which if no data has
-             been received from the client, sshd will send a message through
+             been received from the client, ^[[1msshd ^[[22mwill send a message through
              the encrypted channel to request a response from the client.  The
              default is 0, indicating that these messages will not be sent to
              the client.  This option applies to protocol version 2 only.
 
-     ClientAliveCountMax
+     ^[[1mClientAliveCountMax^[[0m
              Sets the number of client alive messages (see above) which may be
-             sent without sshd receiving any messages back from the client. If
+             sent without ^[[1msshd ^[[22mreceiving any messages back from the client. If
              this threshold is reached while client alive messages are being
-             sent, sshd will disconnect the client, terminating the session.
+             sent, ^[[1msshd ^[[22mwill disconnect the client, terminating the session.
              It is important to note that the use of client alive messages is
-             very different from KeepAlive (below). The client alive messages
+             very different from ^[[1mKeepAlive ^[[22m(below). The client alive messages
              are sent through the encrypted channel and therefore will not be
-             spoofable. The TCP keepalive option enabled by KeepAlive is
+             spoofable. The TCP keepalive option enabled by ^[[1mKeepAlive ^[[22mis
              spoofable. The client alive mechanism is valuable when the client
-             or server depend on knowing when a connection has become inacM--
+             or server depend on knowing when a connection has become inac-
              tive.
 
-             The default value is 3. If ClientAliveInterval (above) is set to
-             15, and ClientAliveCountMax is left at the default, unresponsive
+             The default value is 3. If ^[[1mClientAliveInterval ^[[22m(above) is set to
+             15, and ^[[1mClientAliveCountMax ^[[22mis left at the default, unresponsive
              ssh clients will be disconnected after approximately 45 seconds.
 
-     Compression
+     ^[[1mCompression^[[0m
              Specifies whether compression is allowed.  The argument must be
              ``yes'' or ``no''.  The default is ``yes''.
 
-     DenyGroups
+     ^[[1mDenyGroups^[[0m
              This keyword can be followed by a list of group name patterns,
              separated by spaces.  Login is disallowed for users whose primary
              group or supplementary group list matches one of the patterns.
@@ -108,7 +108,7 @@
              group names are valid; a numerical group ID is not recognized.
              By default, login is allowed for all groups.
 
-     DenyUsers
+     ^[[1mDenyUsers^[[0m
              This keyword can be followed by a list of user name patterns,
              separated by spaces.  Login is disallowed for user names that
              match one of the patterns.  `*' and `'?  can be used as wildcards
@@ -118,50 +118,50 @@
              separately checked, restricting logins to particular users from
              particular hosts.
 
-     GatewayPorts
+     ^[[1mGatewayPorts^[[0m
              Specifies whether remote hosts are allowed to connect to ports
-             forwarded for the client.  By default, sshd binds remote port
+             forwarded for the client.  By default, ^[[1msshd ^[[22mbinds remote port
              forwardings to the loopback address.  This prevents other remote
-             hosts from connecting to forwarded ports.  GatewayPorts can be
-             used to specify that sshd should bind remote port forwardings to
+             hosts from connecting to forwarded ports.  ^[[1mGatewayPorts ^[[22mcan be
+             used to specify that ^[[1msshd ^[[22mshould bind remote port forwardings to
              the wildcard address, thus allowing remote hosts to connect to
              forwarded ports.  The argument must be ``yes'' or ``no''.  The
              default is ``no''.
 
-     HostbasedAuthentication
+     ^[[1mHostbasedAuthentication^[[0m
              Specifies whether rhosts or /etc/hosts.equiv authentication
              together with successful public key client host authentication is
              allowed (hostbased authentication).  This option is similar to
-             RhostsRSAAuthentication and applies to protocol version 2 only.
+             ^[[1mRhostsRSAAuthentication ^[[22mand applies to protocol version 2 only.
              The default is ``no''.
 
-     HostKey
+     ^[[1mHostKey^[[0m
              Specifies a file containing a private host key used by SSH.  The
-             default is /etc/ssh/ssh_host_key for protocol version 1, and
-             /etc/ssh/ssh_host_rsa_key and /etc/ssh/ssh_host_dsa_key for proM--
-             tocol version 2.  Note that sshd will refuse to use a file if it
+             default is ^[[4m/etc/ssh/ssh_host_key^[[24m for protocol version 1, and
+             ^[[4m/etc/ssh/ssh_host_rsa_key^[[24m and ^[[4m/etc/ssh/ssh_host_dsa_key^[[24m for pro-
+             tocol version 2.  Note that ^[[1msshd ^[[22mwill refuse to use a file if it
              is group/world-accessible.  It is possible to have multiple host
              key files.  ``rsa1'' keys are used for version 1 and ``dsa'' or
              ``rsa'' are used for version 2 of the SSH protocol.
 
-     IgnoreRhosts
-             Specifies that .rhosts and .shosts files will not be used in
-             RhostsAuthentication, RhostsRSAAuthentication or
-             HostbasedAuthentication.
+     ^[[1mIgnoreRhosts^[[0m
+             Specifies that ^[[4m.rhosts^[[24m and ^[[4m.shosts^[[24m files will not be used in
+             ^[[1mRhostsAuthentication^[[22m, ^[[1mRhostsRSAAuthentication ^[[22mor
+             ^[[1mHostbasedAuthentication^[[22m.
 
-             /etc/hosts.equiv and /etc/shosts.equiv are still used.  The
+             ^[[4m/etc/hosts.equiv^[[24m and ^[[4m/etc/shosts.equiv^[[24m are still used.  The
              default is ``yes''.
 
-     IgnoreUserKnownHosts
-             Specifies whether sshd should ignore the user's
-             $HOME/.ssh/known_hosts during RhostsRSAAuthentication or
-             HostbasedAuthentication.  The default is ``no''.
+     ^[[1mIgnoreUserKnownHosts^[[0m
+             Specifies whether ^[[1msshd ^[[22mshould ignore the user's
+             ^[[4m$HOME/.ssh/known_hosts^[[24m during ^[[1mRhostsRSAAuthentication ^[[22mor
+             ^[[1mHostbasedAuthentication^[[22m.  The default is ``no''.
 
-     KeepAlive
+     ^[[1mKeepAlive^[[0m
              Specifies whether the system should send TCP keepalive messages
              to the other side.  If they are sent, death of the connection or
              crash of one of the machines will be properly noticed.  However,
-             this means that connections will die if the route is down temM--
+             this means that connections will die if the route is down tem-
              porarily, and some people find it annoying.  On the other hand,
              if keepalives are not sent, sessions may hang indefinitely on the
              server, leaving ``ghost'' users and consuming server resources.
@@ -172,183 +172,183 @@
 
              To disable keepalives, the value should be set to ``no''.
 
-     KerberosAuthentication
+     ^[[1mKerberosAuthentication^[[0m
              Specifies whether Kerberos authentication is allowed.  This can
-             be in the form of a Kerberos ticket, or if PasswordAuthentication
+             be in the form of a Kerberos ticket, or if ^[[1mPasswordAuthentication^[[0m
              is yes, the password provided by the user will be validated
              through the Kerberos KDC.  To use this option, the server needs a
-             Kerberos servtab which allows the verification of the KDC's idenM--
+             Kerberos servtab which allows the verification of the KDC's iden-
              tity.  Default is ``no''.
 
-     KerberosOrLocalPasswd
+     ^[[1mKerberosOrLocalPasswd^[[0m
              If set then if password authentication through Kerberos fails
              then the password will be validated via any additional local
-             mechanism such as /etc/passwd.  Default is ``yes''.
+             mechanism such as ^[[4m/etc/passwd^[[24m.  Default is ``yes''.
 
-     KerberosTgtPassing
+     ^[[1mKerberosTgtPassing^[[0m
              Specifies whether a Kerberos TGT may be forwarded to the server.
              Default is ``no'', as this only works when the Kerberos KDC is
              actually an AFS kaserver.
 
-     KerberosTicketCleanup
+     ^[[1mKerberosTicketCleanup^[[0m
              Specifies whether to automatically destroy the user's ticket
              cache file on logout.  Default is ``yes''.
 
-     KeyRegenerationInterval
+     ^[[1mKeyRegenerationInterval^[[0m
              In protocol version 1, the ephemeral server key is automatically
              regenerated after this many seconds (if it has been used).  The
-             purpose of regeneration is to prevent decrypting captured sesM--
+             purpose of regeneration is to prevent decrypting captured ses-
              sions by later breaking into the machine and stealing the keys.
              The key is never stored anywhere.  If the value is 0, the key is
              never regenerated.  The default is 3600 (seconds).
 
-     ListenAddress
-             Specifies the local addresses sshd should listen on.  The followM--
+     ^[[1mListenAddress^[[0m
+             Specifies the local addresses ^[[1msshd ^[[22mshould listen on.  The follow-
              ing forms may be used:
 
-                   ListenAddress host|IPv4_addr|IPv6_addr
-                   ListenAddress host|IPv4_addr:port
-                   ListenAddress [host|IPv6_addr]:port
-
-             If port is not specified, sshd will listen on the address and all
-             prior Port options specified. The default is to listen on all
-             local addresses.  Multiple ListenAddress options are permitted.
-             Additionally, any Port options must precede this option for non
+                   ^[[1mListenAddress ^[[4m^[[22mhost^[[24m|^[[4mIPv4_addr^[[24m|^[[4mIPv6_addr^[[0m
+                   ^[[1mListenAddress ^[[4m^[[22mhost^[[24m|^[[4mIPv4_addr^[[24m:^[[4mport^[[0m
+                   ^[[1mListenAddress ^[[22m[^[[4mhost^[[24m|^[[4mIPv6_addr^[[24m]:^[[4mport^[[0m
+
+             If ^[[4mport^[[24m is not specified, ^[[1msshd ^[[22mwill listen on the address and all
+             prior ^[[1mPort ^[[22moptions specified. The default is to listen on all
+             local addresses.  Multiple ^[[1mListenAddress ^[[22moptions are permitted.
+             Additionally, any ^[[1mPort ^[[22moptions must precede this option for non
              port qualified addresses.
 
-     LoginGraceTime
-             The server disconnects after this time if the user has not sucM--
+     ^[[1mLoginGraceTime^[[0m
+             The server disconnects after this time if the user has not suc-
              cessfully logged in.  If the value is 0, there is no time limit.
              The default is 120 seconds.
 
-     LogLevel
+     ^[[1mLogLevel^[[0m
              Gives the verbosity level that is used when logging messages from
-             sshd.  The possible values are: QUIET, FATAL, ERROR, INFO, VERM--
+             ^[[1msshd^[[22m.  The possible values are: QUIET, FATAL, ERROR, INFO, VER-
              BOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3.  The default is INFO.
              DEBUG and DEBUG1 are equivalent.  DEBUG2 and DEBUG3 each specify
              higher levels of debugging output.  Logging with a DEBUG level
              violates the privacy of users and is not recommended.
 
-     MACs    Specifies the available MAC (message authentication code) algoM--
+     ^[[1mMACs    ^[[22mSpecifies the available MAC (message authentication code) algo-
              rithms.  The MAC algorithm is used in protocol version 2 for data
-             integrity protection.  Multiple algorithms must be comma-sepaM--
+             integrity protection.  Multiple algorithms must be comma-sepa-
              rated.  The default is
              ``hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96''.
 
-     MaxStartups
-             Specifies the maximum number of concurrent unauthenticated conM--
-             nections to the sshd daemon.  Additional connections will be
-             dropped until authentication succeeds or the LoginGraceTime
+     ^[[1mMaxStartups^[[0m
+             Specifies the maximum number of concurrent unauthenticated con-
+             nections to the ^[[1msshd ^[[22mdaemon.  Additional connections will be
+             dropped until authentication succeeds or the ^[[1mLoginGraceTime^[[0m
              expires for a connection.  The default is 10.
 
              Alternatively, random early drop can be enabled by specifying the
              three colon separated values ``start:rate:full'' (e.g.,
-             "10:30:60").  sshd will refuse connection attempts with a probaM--
+             "10:30:60").  ^[[1msshd ^[[22mwill refuse connection attempts with a proba-
              bility of ``rate/100'' (30%) if there are currently ``start''
-             (10) unauthenticated connections.  The probability increases linM--
+             (10) unauthenticated connections.  The probability increases lin-
              early and all connection attempts are refused if the number of
              unauthenticated connections reaches ``full'' (60).
 
-     PAMAuthenticationViaKbdInt
+     ^[[1mPAMAuthenticationViaKbdInt^[[0m
              Specifies whether PAM challenge response authentication is
              allowed. This allows the use of most PAM challenge response
              authentication modules, but it will allow password authentication
-             regardless of whether PasswordAuthentication is enabled.
+             regardless of whether ^[[1mPasswordAuthentication ^[[22mis enabled.
 
-     PasswordAuthentication
+     ^[[1mPasswordAuthentication^[[0m
              Specifies whether password authentication is allowed.  The
              default is ``yes''.
 
-     PermitEmptyPasswords
+     ^[[1mPermitEmptyPasswords^[[0m
              When password authentication is allowed, it specifies whether the
              server allows login to accounts with empty password strings.  The
              default is ``no''.
 
-     PermitRootLogin
+     ^[[1mPermitRootLogin^[[0m
              Specifies whether root can login using ssh(1).  The argument must
              be ``yes'', ``without-password'', ``forced-commands-only'' or
              ``no''.  The default is ``yes''.
 
-             If this option is set to ``without-password'' password authentiM--
+             If this option is set to ``without-password'' password authenti-
              cation is disabled for root.
 
              If this option is set to ``forced-commands-only'' root login with
              public key authentication will be allowed, but only if the
-             command option has been specified (which may be useful for taking
+             ^[[4mcommand^[[24m option has been specified (which may be useful for taking
              remote backups even if root login is normally not allowed). All
              other authentication methods are disabled for root.
 
              If this option is set to ``no'' root is not allowed to login.
 
-     PermitUserEnvironment
-             Specifies whether ~/.ssh/environment and environment= options in
-             ~/.ssh/authorized_keys are processed by sshd.  The default is
+     ^[[1mPermitUserEnvironment^[[0m
+             Specifies whether ^[[4m~/.ssh/environment^[[24m and ^[[1menvironment= ^[[22moptions in
+             ^[[4m~/.ssh/authorized_keys^[[24m are processed by ^[[1msshd^[[22m.  The default is
              ``no''.  Enabling environment processing may enable users to
-             bypass access restrictions in some configurations using mechaM--
+             bypass access restrictions in some configurations using mecha-
              nisms such as LD_PRELOAD.
 
-     PidFile
-             Specifies the file that contains the process ID of the sshd daeM--
-             mon.  The default is /var/run/sshd.pid.
+     ^[[1mPidFile^[[0m
+             Specifies the file that contains the process ID of the ^[[1msshd ^[[22mdae-
+             mon.  The default is ^[[4m/var/run/sshd.pid^[[24m.
 
-     Port    Specifies the port number that sshd listens on.  The default is
+     ^[[1mPort    ^[[22mSpecifies the port number that ^[[1msshd ^[[22mlistens on.  The default is
              22.  Multiple options of this type are permitted.  See also
-             ListenAddress.
+             ^[[1mListenAddress^[[22m.
 
-     PrintLastLog
-             Specifies whether sshd should print the date and time when the
+     ^[[1mPrintLastLog^[[0m
+             Specifies whether ^[[1msshd ^[[22mshould print the date and time when the
              user last logged in.  The default is ``yes''.
 
-     PrintMotd
-             Specifies whether sshd should print /etc/motd when a user logs in
+     ^[[1mPrintMotd^[[0m
+             Specifies whether ^[[1msshd ^[[22mshould print ^[[4m/etc/motd^[[24m when a user logs in
              interactively.  (On some systems it is also printed by the shell,
-             /etc/profile, or equivalent.)  The default is ``yes''.
+             ^[[4m/etc/profile^[[24m, or equivalent.)  The default is ``yes''.
 
-     Protocol
-             Specifies the protocol versions sshd supports.  The possible valM--
-             ues are ``1'' and ``2''.  Multiple versions must be comma-sepaM--
-             rated.  The default is ``2,1''.  Note that the order of the proM--
+     ^[[1mProtocol^[[0m
+             Specifies the protocol versions ^[[1msshd ^[[22msupports.  The possible val-
+             ues are ``1'' and ``2''.  Multiple versions must be comma-sepa-
+             rated.  The default is ``2,1''.  Note that the order of the pro-
              tocol list does not indicate preference, because the client
              selects among multiple protocol versions offered by the server.
              Specifying ``2,1'' is identical to ``1,2''.
 
-     PubkeyAuthentication
+     ^[[1mPubkeyAuthentication^[[0m
              Specifies whether public key authentication is allowed.  The
              default is ``yes''.  Note that this option applies to protocol
              version 2 only.
 
-     RhostsAuthentication
+     ^[[1mRhostsAuthentication^[[0m
              Specifies whether authentication using rhosts or /etc/hosts.equiv
-             files is sufficient.  Normally, this method should not be permitM--
-             ted because it is insecure.  RhostsRSAAuthentication should be
+             files is sufficient.  Normally, this method should not be permit-
+             ted because it is insecure.  ^[[1mRhostsRSAAuthentication ^[[22mshould be
              used instead, because it performs RSA-based host authentication
              in addition to normal rhosts or /etc/hosts.equiv authentication.
              The default is ``no''.  This option applies to protocol version 1
              only.
 
-     RhostsRSAAuthentication
+     ^[[1mRhostsRSAAuthentication^[[0m
              Specifies whether rhosts or /etc/hosts.equiv authentication
              together with successful RSA host authentication is allowed.  The
              default is ``no''.  This option applies to protocol version 1
              only.
 
-     RSAAuthentication
+     ^[[1mRSAAuthentication^[[0m
              Specifies whether pure RSA authentication is allowed.  The
              default is ``yes''.  This option applies to protocol version 1
              only.
 
-     ServerKeyBits
+     ^[[1mServerKeyBits^[[0m
              Defines the number of bits in the ephemeral protocol version 1
              server key.  The minimum value is 512, and the default is 768.
 
-     StrictModes
-             Specifies whether sshd should check file modes and ownership of
+     ^[[1mStrictModes^[[0m
+             Specifies whether ^[[1msshd ^[[22mshould check file modes and ownership of
              the user's files and home directory before accepting login.  This
              is normally desirable because novices sometimes accidentally
              leave their directory or files world-writable.  The default is
              ``yes''.
 
-     Subsystem
+     ^[[1mSubsystem^[[0m
              Configures an external subsystem (e.g., file transfer daemon).
              Arguments should be a subsystem name and a command to execute
              upon subsystem request.  The command sftp-server(8) implements
@@ -356,90 +356,90 @@
              are defined.  Note that this option applies to protocol version 2
              only.
 
-     SyslogFacility
+     ^[[1mSyslogFacility^[[0m
              Gives the facility code that is used when logging messages from
-             sshd.  The possible values are: DAEMON, USER, AUTH, LOCAL0,
+             ^[[1msshd^[[22m.  The possible values are: DAEMON, USER, AUTH, LOCAL0,
              LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.  The
              default is AUTH.
 
-     UseLogin
-             Specifies whether login(1) is used for interactive login sesM--
+     ^[[1mUseLogin^[[0m
+             Specifies whether login(1) is used for interactive login ses-
              sions.  The default is ``no''.  Note that login(1) is never used
              for remote command execution.  Note also, that if this is
-             enabled, X11Forwarding will be disabled because login(1) does not
-             know how to handle xauth(1) cookies.  If UsePrivilegeSeparation
+             enabled, ^[[1mX11Forwarding ^[[22mwill be disabled because login(1) does not
+             know how to handle xauth(1) cookies.  If ^[[1mUsePrivilegeSeparation^[[0m
              is specified, it will be disabled after authentication.
 
-     UsePrivilegeSeparation
-             Specifies whether sshd separates privileges by creating an
+     ^[[1mUsePrivilegeSeparation^[[0m
+             Specifies whether ^[[1msshd ^[[22mseparates privileges by creating an
              unprivileged child process to deal with incoming network traffic.
              After successful authentication, another process will be created
              that has the privilege of the authenticated user.  The goal of
-             privilege separation is to prevent privilege escalation by conM--
+             privilege separation is to prevent privilege escalation by con-
              taining any corruption within the unprivileged processes.  The
              default is ``yes''.
 
-     VerifyReverseMapping
-             Specifies whether sshd should try to verify the remote host name
+     ^[[1mVerifyReverseMapping^[[0m
+             Specifies whether ^[[1msshd ^[[22mshould try to verify the remote host name
              and check that the resolved host name for the remote IP address
              maps back to the very same IP address.  The default is ``no''.
 
-     X11DisplayOffset
-             Specifies the first display number available for sshd's X11 forM--
-             warding.  This prevents sshd from interfering with real X11
+     ^[[1mX11DisplayOffset^[[0m
+             Specifies the first display number available for ^[[1msshd^[[22m's X11 for-
+             warding.  This prevents ^[[1msshd ^[[22mfrom interfering with real X11
              servers.  The default is 10.
 
-     X11Forwarding
+     ^[[1mX11Forwarding^[[0m
              Specifies whether X11 forwarding is permitted.  The argument must
              be ``yes'' or ``no''.  The default is ``no''.
 
              When X11 forwarding is enabled, there may be additional exposure
-             to the server and to client displays if the sshd proxy display is
-             configured to listen on the wildcard address (see X11UseLocalhost
+             to the server and to client displays if the ^[[1msshd ^[[22mproxy display is
+             configured to listen on the wildcard address (see ^[[1mX11UseLocalhost^[[0m
              below), however this is not the default.  Additionally, the
              authentication spoofing and authentication data verification and
              substitution occur on the client side.  The security risk of
              using X11 forwarding is that the client's X11 display server may
              be exposed to attack when the ssh client requests forwarding (see
-             the warnings for ForwardX11 in ssh_config(5) ). A system adminisM--
+             the warnings for ^[[1mForwardX11 ^[[22min ssh_config(5) ). A system adminis-
              trator may have a stance in which they want to protect clients
              that may expose themselves to attack by unwittingly requesting
              X11 forwarding, which can warrant a ``no'' setting.
 
              Note that disabling X11 forwarding does not prevent users from
              forwarding X11 traffic, as users can always install their own
-             forwarders.  X11 forwarding is automatically disabled if UseLogin
+             forwarders.  X11 forwarding is automatically disabled if ^[[1mUseLogin^[[0m
              is enabled.
 
-     X11UseLocalhost
-             Specifies whether sshd should bind the X11 forwarding server to
+     ^[[1mX11UseLocalhost^[[0m
+             Specifies whether ^[[1msshd ^[[22mshould bind the X11 forwarding server to
              the loopback address or to the wildcard address.  By default,
-             sshd binds the forwarding server to the loopback address and sets
+             ^[[1msshd ^[[22mbinds the forwarding server to the loopback address and sets
              the hostname part of the DISPLAY environment variable to
              ``localhost''.  This prevents remote hosts from connecting to the
              proxy display.  However, some older X11 clients may not function
-             with this configuration.  X11UseLocalhost may be set to ``no'' to
-             specify that the forwarding server should be bound to the wildM--
+             with this configuration.  ^[[1mX11UseLocalhost ^[[22mmay be set to ``no'' to
+             specify that the forwarding server should be bound to the wild-
              card address.  The argument must be ``yes'' or ``no''.  The
              default is ``yes''.
 
-     XAuthLocation
+     ^[[1mXAuthLocation^[[0m
              Specifies the full pathname of the xauth(1) program.  The default
-             is /usr/X11R6/bin/xauth.
+             is ^[[4m/usr/X11R6/bin/xauth^[[24m.
 
-   Time Formats
+   ^[[1mTime Formats^[[0m
 
-     sshd command-line arguments and configuration file options that specify
-     time may be expressed using a sequence of the form: time[qualifier],
-     where time is a positive integer value and qualifier is one of the folM--
+     ^[[1msshd ^[[22mcommand-line arguments and configuration file options that specify
+     time may be expressed using a sequence of the form: ^[[4mtime^[[24m[^[[4mqualifier^[[24m],
+     where ^[[4mtime^[[24m is a positive integer value and ^[[4mqualifier^[[24m is one of the fol-
      lowing:
 
-           <none>  seconds
-           s | S   seconds
-           m | M   minutes
-           h | H   hours
-           d | D   days
-           w | W   weeks
+           ^[[1m<none>  ^[[22mseconds
+           ^[[1ms ^[[22m| ^[[1mS   ^[[22mseconds
+           ^[[1mm ^[[22m| ^[[1mM   ^[[22mminutes
+           ^[[1mh ^[[22m| ^[[1mH   ^[[22mhours
+           ^[[1md ^[[22m| ^[[1mD   ^[[22mdays
+           ^[[1mw ^[[22m| ^[[1mW   ^[[22mweeks
 
      Each member of the sequence is added together to calculate the total time
      value.
@@ -450,21 +450,21 @@
            10m     10 minutes
            1h30m   1 hour 30 minutes (90 minutes)
 
-FILES
+^[[1mFILES^[[0m
      /etc/ssh/sshd_config
-             Contains configuration data for sshd.  This file should be
-             writable by root only, but it is recommended (though not necesM--
+             Contains configuration data for ^[[1msshd^[[22m.  This file should be
+             writable by root only, but it is recommended (though not neces-
              sary) that it be world-readable.
 
-AUTHORS
+^[[1mAUTHORS^[[0m
      OpenSSH is a derivative of the original and free ssh 1.2.12 release by
      Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo
-     de Raadt and Dug Song removed many bugs, re-added newer features and creM--
+     de Raadt and Dug Song removed many bugs, re-added newer features and cre-
      ated OpenSSH.  Markus Friedl contributed the support for SSH protocol
      versions 1.5 and 2.0.  Niels Provos and Markus Friedl contributed support
      for privilege separation.
 
-SEE ALSO
+^[[1mSEE ALSO^[[0m
      sshd(8)
 
 BSD                           September 25, 1999                           BSD
diff -ru openssh-3.5p1.orig/version.h openssh-3.5p1/version.h
--- openssh-3.5p1.orig/version.h	2002-10-03 11:55:38.000000000 +1000
+++ openssh-3.5p1/version.h	2003-03-12 21:10:26.000000000 +1100
@@ -1,4 +1,4 @@
 /* $OpenBSD: version.h,v 1.35 2002/10/01 13:24:50 markus Exp $ */
 
-#define SSH_VERSION	"OpenSSH_3.5p1"
+#define SSH_VERSION	"OpenSSH_3.5p1-pwexp18"
 
