diff -urN openssh-5.1p1.old/readconf.c openssh-5.1p1/readconf.c
--- openssh-5.1p1.old/readconf.c	2008-06-29 09:04:03.000000000 -0500
+++ openssh-5.1p1/readconf.c	2010-03-10 23:41:30.000000000 -0600
@@ -115,7 +115,7 @@
 	oPasswordAuthentication, oRSAAuthentication,
 	oChallengeResponseAuthentication, oXAuthLocation,
 	oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward,
-	oUser, oHost, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand,
+	oUser, oPassword, oHost, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand,
 	oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
 	oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,
 	oCompressionLevel, oTCPKeepAlive, oNumberOfPasswordPrompts,
@@ -185,6 +185,7 @@
 	{ "remoteforward", oRemoteForward },
 	{ "localforward", oLocalForward },
 	{ "user", oUser },
+	{ "password", oPassword },
 	{ "host", oHost },
 	{ "escapechar", oEscapeChar },
 	{ "globalknownhostsfile", oGlobalKnownHostsFile },
@@ -567,6 +568,10 @@
 			*charptr = xstrdup(arg);
 		break;
 
+	case oPassword:
+		charptr = &options->password;
+		goto parse_string;
+
 	case oGlobalKnownHostsFile:
 		charptr = &options->system_hostfile;
 		goto parse_string;
@@ -1042,6 +1047,7 @@
 	options->hostname = NULL;
 	options->host_key_alias = NULL;
 	options->proxy_command = NULL;
+	options->password = NULL;
 	options->user = NULL;
 	options->escape_char = -1;
 	options->system_hostfile = NULL;
diff -urN openssh-5.1p1.old/readconf.h openssh-5.1p1/readconf.h
--- openssh-5.1p1.old/readconf.h	2008-06-29 09:04:03.000000000 -0500
+++ openssh-5.1p1/readconf.h	2010-03-10 23:41:30.000000000 -0600
@@ -75,6 +75,7 @@
 	char   *host_key_alias;	/* hostname alias for .ssh/known_hosts */
 	char   *proxy_command;	/* Proxy command for connecting the host. */
 	char   *user;		/* User to log in as. */
+	char   *password;		/* Password to log in as. */
 	int     escape_char;	/* Escape character; -2 = none */
 
 	char   *system_hostfile;/* Path for /etc/ssh/ssh_known_hosts. */
diff -urN openssh-5.1p1.old/scp.0 openssh-5.1p1/scp.0
--- openssh-5.1p1.old/scp.0	2008-07-21 03:30:50.000000000 -0500
+++ openssh-5.1p1/scp.0	2010-03-10 23:41:30.000000000 -0600
@@ -105,6 +105,7 @@
                    TCPKeepAlive
                    UsePrivilegedPort
                    User
+                   Password
                    UserKnownHostsFile
                    VerifyHostKeyDNS
 
diff -urN openssh-5.1p1.old/scp.1 openssh-5.1p1/scp.1
--- openssh-5.1p1.old/scp.1	2008-07-12 02:12:49.000000000 -0500
+++ openssh-5.1p1/scp.1	2010-03-10 23:41:30.000000000 -0600
@@ -169,6 +169,7 @@
 .It TCPKeepAlive
 .It UsePrivilegedPort
 .It User
+.It Password
 .It UserKnownHostsFile
 .It VerifyHostKeyDNS
 .El
diff -urN openssh-5.1p1.old/sftp.0 openssh-5.1p1/sftp.0
--- openssh-5.1p1.old/sftp.0	2008-07-21 03:30:51.000000000 -0500
+++ openssh-5.1p1/sftp.0	2010-03-10 23:41:30.000000000 -0600
@@ -107,6 +107,7 @@
                    TCPKeepAlive
                    UsePrivilegedPort
                    User
+                   Password
                    UserKnownHostsFile
                    VerifyHostKeyDNS
 
diff -urN openssh-5.1p1.old/sftp.1 openssh-5.1p1/sftp.1
--- openssh-5.1p1.old/sftp.1	2008-07-16 06:17:23.000000000 -0500
+++ openssh-5.1p1/sftp.1	2010-03-10 23:41:30.000000000 -0600
@@ -192,6 +192,7 @@
 .It TCPKeepAlive
 .It UsePrivilegedPort
 .It User
+.It Password
 .It UserKnownHostsFile
 .It VerifyHostKeyDNS
 .El
diff -urN openssh-5.1p1.old/ssh.0 openssh-5.1p1/ssh.0
--- openssh-5.1p1.old/ssh.0	2008-07-21 03:30:50.000000000 -0500
+++ openssh-5.1p1/ssh.0	2010-03-10 23:41:30.000000000 -0600
@@ -277,6 +277,7 @@
                    TunnelDevice
                    UsePrivilegedPort
                    User
+                   Password
                    UserKnownHostsFile
                    VerifyHostKeyDNS
                    VisualHostKey
diff -urN openssh-5.1p1.old/ssh.1 openssh-5.1p1/ssh.1
--- openssh-5.1p1.old/ssh.1	2008-07-03 21:53:50.000000000 -0500
+++ openssh-5.1p1/ssh.1	2010-03-10 23:41:30.000000000 -0600
@@ -505,6 +505,7 @@
 .It TunnelDevice
 .It UsePrivilegedPort
 .It User
+.It Password
 .It UserKnownHostsFile
 .It VerifyHostKeyDNS
 .It VisualHostKey
diff -urN openssh-5.1p1.old/ssh_config.0 openssh-5.1p1/ssh_config.0
--- openssh-5.1p1.old/ssh_config.0	2008-07-21 03:30:51.000000000 -0500
+++ openssh-5.1p1/ssh_config.0	2010-03-10 23:41:30.000000000 -0600
@@ -589,6 +589,10 @@
              trouble of having to remember to give the user name on the com-
              mand line.
 
+     Password
+             Specifies the password to log in as.  This can be useful when
+             keys are not allowed on the remote machine.
+
      UserKnownHostsFile
              Specifies a file to use for the user host key database instead of
              ~/.ssh/known_hosts.
diff -urN openssh-5.1p1.old/ssh_config.5 openssh-5.1p1/ssh_config.5
--- openssh-5.1p1.old/ssh_config.5	2008-06-29 09:04:03.000000000 -0500
+++ openssh-5.1p1/ssh_config.5	2010-03-10 23:41:30.000000000 -0600
@@ -1028,6 +1028,9 @@
 This can be useful when a different user name is used on different machines.
 This saves the trouble of
 having to remember to give the user name on the command line.
+.It Cm Password
+Specifies the password to log in as.
+This can be useful when keys are not allowed on the remote machine.
 .It Cm UserKnownHostsFile
 Specifies a file to use for the user
 host key database instead of
diff -urN openssh-5.1p1.old/sshconnect2.c openssh-5.1p1/sshconnect2.c
--- openssh-5.1p1.old/sshconnect2.c	2008-07-17 04:15:43.000000000 -0500
+++ openssh-5.1p1/sshconnect2.c	2010-03-10 23:41:30.000000000 -0600
@@ -262,7 +262,7 @@
 	{"password",
 		userauth_passwd,
 		&options.password_authentication,
-		&options.batch_mode},
+		NULL},
 	{"none",
 		userauth_none,
 		NULL,
@@ -751,20 +751,29 @@
 	if (attempt++ >= options.number_of_password_prompts)
 		return 0;
 
-	if (attempt != 1)
-		error("Permission denied, please try again.");
-
-	snprintf(prompt, sizeof(prompt), "%.30s@%.128s's password: ",
-	    authctxt->server_user, authctxt->host);
-	password = read_passphrase(prompt, 0);
+  if (options.password != NULL) {
+    password = options.password;
+    options.number_of_password_prompts = 1;
+  } else {
+		if (options.batch_mode)
+			return 0;
+  	if (attempt != 1)
+  		error("Permission denied, please try again.");
+  
+  	snprintf(prompt, sizeof(prompt), "%.30s@%.128s's password: ",
+  	    authctxt->server_user, authctxt->host);
+  	password = read_passphrase(prompt, 0);
+  }
 	packet_start(SSH2_MSG_USERAUTH_REQUEST);
 	packet_put_cstring(authctxt->server_user);
 	packet_put_cstring(authctxt->service);
 	packet_put_cstring(authctxt->method->name);
 	packet_put_char(0);
 	packet_put_cstring(password);
-	memset(password, 0, strlen(password));
-	xfree(password);
+  if (options.password == NULL) {
+  	memset(password, 0, strlen(password));
+  	xfree(password);
+  }
 	packet_add_padding(64);
 	packet_send();
 
