Index: src/backend/sys_cmd.c
===================================================================
--- src/backend/sys_cmd.c	(revision 2656)
+++ src/backend/sys_cmd.c	(working copy)
@@ -1509,13 +1509,14 @@
                               "StrictHostKeyChecking=no","-o", "CheckHostIP=no",
                               localfile, remotepath, NULL);
 	} else {
-		ret = ptyrun("scp", SCP_PATH, "scp", "-S", SSH_PATH,
-			"-o", pass, "-o", "stricthostkeychecking no",
-			"-o", "checkhostip no", remotepath, localfile, NULL);
+		ret = ptyrun("sshpass", "/usr/bin/sshpass", "sshpass", "-p",
+                              pass, SCP_PATH,"-S", SSH_PATH, "-o",
+                              "StrictHostKeyChecking=no","-o", "CheckHostIP=no",
+                               remotepath,localfile, NULL);
 	}
 	scp_progress = 0;
 	alarm(0);
-
+	
 	ret = 0;
 	return (ret);
 }
@@ -1672,7 +1673,8 @@
 		free_all_instances(names, cnt);
 		return -1;
 	}
-
+#endif
+	int ret;
 	ret = transfer_files_via_scp(IMPORT_FILES_VIA_SCP, RESTORE_FILE_PATH, server,
 		username, remotefile);
 	if(ret != 0) {
@@ -1687,7 +1689,6 @@
 		printf("Failed to restore the config\n");
 		return -1;
 	}
-#endif 
 	return 0;
 }
 
@@ -1694,8 +1695,9 @@
 int
 import_all_via_tftp(uint32_t tftp_ip, char *filename, char *passwd)
 {
+
+	int ret;
 #if 0
-	int ret;
 	char **names;
 	int cnt;
 
@@ -1705,7 +1707,7 @@
 		free_all_instances(names, cnt);
 		return -1;
 	}
-
+#endif
 	ret = import_files_via_tftp(tftp_ip, RESTORE_FILE_PATH, filename);
 	if(ret != 0) {
 		printf("Failed to get the file from tftp server\n");
@@ -1717,7 +1719,6 @@
 		printf("Failed to restore the config\n");
 		return -1;
 	}
-#endif
 	return 0;
 }
 
Index: src/backend/sys_tool.c
===================================================================
--- src/backend/sys_tool.c	(revision 2655)
+++ src/backend/sys_tool.c	(working copy)
@@ -2709,7 +2709,7 @@
 {
 	char cmd[1024];
 	char buffer[2048];;
-	int found = 0;
+	// int found = 0;
 	int i;
 
 	/* the current configuration */
@@ -2741,7 +2741,6 @@
 		}
 		
 	}
-	#endif
 	if(!found) {
 		printf("Failed to get the current model information\n");
         fclose(fp);
@@ -2748,7 +2747,7 @@
 		return -1;
 
 	}
-
+	#endif
 	strcat(buffer, "\n");
 	fwrite(buffer, 1, strlen(buffer), fp);
 	fclose(fp);
@@ -2854,7 +2853,7 @@
 	char *p = NULL;
 	FILE *fp = NULL;
 	char warnmsg[BUF_LEN];
-	int found = 0;
+	// int found = 0;
 
 	bzero(version, BUF_LEN);
 	bzero(model, BUF_LEN);
@@ -2906,12 +2905,11 @@
 			break;
 		}
 	}
-#endif	
 	if(!found) {
 		printf("Failed to get the current model information\n");
 		return -1;
 	}
-
+#endif
 	if(strncmp(cur_model, model, strlen(model) - 1) != 0) {
 		printf("Loading configuration from the config file is not allowed when model doesn't match!\n");
 		return -1;
