From 336910e6f6e4f5554e491d94b4291ccffc30a779 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 27 May 2011 01:46:11 +0100 Subject: [PATCH] controller: add debug info for host key checking --- SparkleShare/SparkleController.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index 4e11e1c5..0f3b22ee 100644 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -801,8 +801,8 @@ namespace SparkleShare { { string ssh_config_file_path = SparkleHelpers.CombineMore ( SparklePaths.HomePath, ".ssh", "config"); - - string ssh_config = Environment.NewLine + "Host " + host + + + string ssh_config = Environment.NewLine + "Host " + host + Environment.NewLine + "\tStrictHostKeyChecking no"; if (File.Exists (ssh_config_file_path)) { @@ -815,10 +815,12 @@ namespace SparkleShare { writer.WriteLine (ssh_config); writer.Close (); } - + UnixFileSystemInfo file_info = new UnixFileInfo (ssh_config_file_path); file_info.FileAccessPermissions = (FileAccessPermissions.UserRead | FileAccessPermissions.UserWrite); + + SparkleHelpers.DebugInfo ("Controller", "Disabled host key checking"); } @@ -827,7 +829,7 @@ namespace SparkleShare { string ssh_config_file_path = SparkleHelpers.CombineMore ( SparklePaths.HomePath, ".ssh", "config"); - string ssh_config = Environment.NewLine + "Host " + host + + string ssh_config = Environment.NewLine + "Host " + host + Environment.NewLine + "\tStrictHostKeyChecking no"; if (File.Exists (ssh_config_file_path)) { @@ -846,15 +848,17 @@ namespace SparkleShare { TextWriter writer = new StreamWriter (ssh_config_file_path); writer.WriteLine (current_ssh_config); writer.Close (); - + UnixFileSystemInfo file_info = new UnixFileInfo (ssh_config_file_path); file_info.FileAccessPermissions = (FileAccessPermissions.UserRead | FileAccessPermissions.UserWrite); } } - } - + SparkleHelpers.DebugInfo ("Controller", "Enabled host key checking"); + } + + // Gets the avatar for a specific email address and size public string GetAvatar (string email, int size) {