Index: wp-admin/includes/class-wp-filesystem-base.php
===================================================================
--- wp-admin/includes/class-wp-filesystem-base.php	(revision 8808)
+++ wp-admin/includes/class-wp-filesystem-base.php	(working copy)
@@ -18,16 +18,19 @@
 	var $method = '';
 
 	function abspath() {
+		// @todo: Add SSH2_BASE
 		if ( defined('FTP_BASE') && strpos($this->method, 'ftp') !== false )
 			return FTP_BASE;
 		return $this->find_folder(ABSPATH);
 	}
 	function wp_content_dir() {
+		// @todo: Add SSH2_CONTENT_DIR
 		if ( defined('FTP_CONTENT_DIR') && strpos($this->method, 'ftp') !== false )
 			return FTP_CONTENT_DIR;
 		return $this->find_folder(WP_CONTENT_DIR);
 	}
 	function wp_plugins_dir() {
+		// @todo: Add SSH2_PLUGIN_DIR
 		if ( defined('FTP_PLUGIN_DIR') && strpos($this->method, 'ftp') !== false )
 			return FTP_PLUGIN_DIR;
 		return $this->find_folder(WP_PLUGIN_DIR);
Index: wp-admin/includes/file.php
===================================================================
--- wp-admin/includes/file.php	(revision 8808)
+++ wp-admin/includes/file.php	(working copy)
@@ -480,8 +480,10 @@
 		unlink($temp_file);
 	}
 
-	if ( ! $method && extension_loaded('ftp') ) $method = 'ftpext';
+	if ( ! $method && extension_loaded("ssh2") && (get_option('transfer_protocol') == "ssh2") ) $method = 'ssh2';
+	if ( ! $method && extension_loaded('ftp') && (get_option('transfer_protocol') == "ftp") ) $method = 'ftpext';
 	if ( ! $method && ( extension_loaded('sockets') || function_exists('fsockopen') ) ) $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread
+	
 	return apply_filters('filesystem_method', $method);
 }
 
@@ -496,18 +498,34 @@
 	if ( 'direct' == $type )
 		return true;
 
-	if( ! $credentials = get_option('ftp_credentials') )
+	if( ! $credentials = get_option('transfer_credentials') )
 		$credentials = array();
 	// If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option)
-	$credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? $_POST['hostname'] : $credentials['hostname']);
-	$credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? $_POST['username'] : $credentials['username']);
-	$credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? $_POST['password'] : $credentials['password']);
-	$credentials['ssl']      = defined('FTP_SSL')  ? FTP_SSL  : ( isset($_POST['ssl'])      ? $_POST['ssl']      : $credentials['ssl']);
+	
+	switch ($type)
+	{
+		case 'ftp': {
+				$credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? $_POST['hostname'] : $credentials['hostname']);
+				$credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? $_POST['username'] : $credentials['username']);
+				$credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? $_POST['password'] : $credentials['password']);
+				$credentials['ssl']      = defined('FTP_SSL')  ? FTP_SSL  : ( isset($_POST['ssl'])      ? $_POST['ssl']      : $credentials['ssl']);
+			break;
+		}
+		case 'ssh2': {
+				$credentials['hostname'] = defined('SSH2_HOST') ? SSH2_HOST : (!empty($_POST['hostname']) ? $_POST['hostname'] : $credentials['hostname']);
+				$credentials['username'] = defined('SSH2_USER') ? SSH2_USER : (!empty($_POST['username']) ? $_POST['username'] : $credentials['username']);
+				$credentials['password'] = defined('SSH2_PASS') ? SSH2_PASS : (!empty($_POST['password']) ? $_POST['password'] : $credentials['password']);
+				$credentials['ssl'] = '';	// no ssl in ssh2
+			break;
+		}
+	}
+	
 
+
 	if ( ! $error && !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) {
 		$stored_credentials = $credentials;
 		unset($stored_credentials['password']);
-		update_option('ftp_credentials', $stored_credentials);
+		update_option('transfer_credentials', $stored_credentials);
 		return $credentials;
 	}
 	$hostname = '';
@@ -521,21 +539,23 @@
 ?>
 <form action="<?php echo $form_post ?>" method="post">
 <div class="wrap">
-<h2><?php _e('FTP Connection Information') ?></h2>
-<p><?php _e('To perform the requested action, FTP connection information is required.') ?></p>
+<?php $connection_method = strtoupper(get_option('transfer_protocol')); ?>
+<h2><?php _e($connection_method.' Connection Information') ?></h2>
+<p><?php _e('To perform the requested action, '.$connection_method.' connection information is required.') ?></p>
 <table class="form-table">
 <tr valign="top">
 <th scope="row"><label for="hostname"><?php _e('Hostname:') ?></label></th>
-<td><input name="hostname" type="text" id="hostname" value="<?php echo attribute_escape($hostname) ?>"<?php if( defined('FTP_HOST') ) echo ' disabled="disabled"' ?> size="40" /></td>
+<td><input name="hostname" type="text" id="hostname" value="<?php echo attribute_escape($hostname) ?>"<?php if( defined('FTP_HOST') || defined('SSH2_HOST') ) echo ' disabled="disabled"' ?> size="40" /></td>
 </tr>
 <tr valign="top">
 <th scope="row"><label for="username"><?php _e('Username:') ?></label></th>
-<td><input name="username" type="text" id="username" value="<?php echo attribute_escape($username) ?>"<?php if( defined('FTP_USER') ) echo ' disabled="disabled"' ?> size="40" /></td>
+<td><input name="username" type="text" id="username" value="<?php echo attribute_escape($username) ?>"<?php if( defined('FTP_USER') || defined('SSH2_USER') ) echo ' disabled="disabled"' ?> size="40" /></td>
 </tr>
 <tr valign="top">
 <th scope="row"><label for="password"><?php _e('Password:') ?></label></th>
-<td><input name="password" type="password" id="password" value=""<?php if( defined('FTP_PASS') ) echo ' disabled="disabled"' ?> size="40" /><?php if( defined('FTP_PASS') && !empty($password) ) echo '<em>'.__('(Password not shown)').'</em>'; ?></td>
+<td><input name="password" type="password" id="password" value=""<?php if( defined('FTP_PASS') || defined('SSH2_PASS') ) echo ' disabled="disabled"' ?> size="40" /><?php if( (defined('FTP_PASS') || defined('SSH2_PASS')) && !empty($password) ) echo '<em>'.__('(Password not shown)').'</em>'; ?></td>
 </tr>
+<?php if (get_option('transfer_protocol') == "ftp") { ?>
 <tr valign="top">
 <th scope="row"><label for="ssl"><?php _e('Use SSL:') ?></label></th>
 <td>
@@ -549,6 +569,7 @@
 </select>
 </td>
 </tr>
+<?php } ?>
 </table>
 <p class="submit">
 <input type="submit" name="submit" value="<?php _e('Proceed'); ?>" />
Index: wp-admin/includes/update-core.php
===================================================================
--- wp-admin/includes/update-core.php	(revision 8808)
+++ wp-admin/includes/update-core.php	(working copy)
@@ -188,7 +188,7 @@
 	$maintenance_file = $to . '.maintenance';
 	$wp_filesystem->delete($maintenance_file);
 	$wp_filesystem->put_contents($maintenance_file, $maintenance_string, 0644);
-
+	
 	// Copy new versions of WP files into place.
 	$result = copy_dir($from . '/wordpress', $to);
 	if ( is_wp_error($result) ) {
Index: wp-admin/includes/upgrade.php
===================================================================
--- wp-admin/includes/upgrade.php	(revision 8808)
+++ wp-admin/includes/upgrade.php	(working copy)
@@ -764,6 +764,10 @@
 function upgrade_270() {
 	if ( $wp_current_db_version < 8530 )
 		populate_roles_270();
+	
+	
+	// @todo: change the setting... ftp_credentials to transfer_credentials in the options table. Then set it to "ftp" as default.
+	
 }
 
 
Index: wp-admin/options-misc.php
===================================================================
--- wp-admin/options-misc.php	(revision 8808)
+++ wp-admin/options-misc.php	(working copy)
@@ -21,6 +21,25 @@
 <form method="post" action="options.php">
 <input type='hidden' name='option_page' value='misc' />
 <?php wp_nonce_field('misc-options') ?>
+<h3><?php _e('Transfer/Upgrading Settings'); ?></h3>
+<table class="form-table">
+<?php if (extension_loaded("ssh2")) { ?>
+<tr valign="top">
+<th scope="row"><?php _e('Select the file transfer type your like to use') ?></th>
+<td><fieldset><legend class="hidden"><?php _e('Select the file transfer type your like to use') ?></legend>
+<?php
+	$transfer_protocols = array('ftp' => 'FTP', 'ssh2' => 'SSH2');
+	foreach ($transfer_protocols as $type => $name) { ?>
+		<input type="radio" name="transfer_protocol" id="transfer_protocol_<?php echo $type; ?>" value="<?php echo $type; ?>"<?php echo (get_option('transfer_protocol') == $type ? ' checked="checked"' : ''); ?> />			
+		<label for="transfer_protocol_<?php echo $type; ?>"><?php _e($name); ?></label>
+	<?php
+	}
+?>
+</fieldset></td>
+</tr>
+<?php } ?>
+<!-- @todo: Add option for what the message will be when updating the core of the wordpress. -->
+</table>
 <h3><?php _e('Uploading'); ?></h3>
 <table class="form-table">
 <tr valign="top">
Index: wp-admin/options.php
===================================================================
--- wp-admin/options.php	(revision 8808)
+++ wp-admin/options.php	(working copy)
@@ -24,7 +24,7 @@
 $whitelist_options = array(
 	'general' => array('blogname', 'blogdescription', 'admin_email', 'users_can_register', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'comment_registration', 'default_role'),
 	'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating' ),
-	'misc' => array( 'hack_file', 'use_linksupdate', 'uploads_use_yearmonth_folders', 'upload_path', 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'large_size_w', 'large_size_h' ),
+	'misc' => array( 'transfer_protocol', 'hack_file', 'use_linksupdate', 'uploads_use_yearmonth_folders', 'upload_path', 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'large_size_w', 'large_size_h' ),
 	'privacy' => array( 'blog_public' ),
 	'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'gzipcompression', 'show_on_front', 'page_on_front', 'page_for_posts' ),
 	'writing' => array( 'default_post_edit_rows', 'use_smilies', 'ping_sites', 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'enable_app', 'enable_xmlrpc' ),
