Subversion Repositories SmartDukaan

Rev

Rev 25409 | Rev 25411 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25409 Rev 25410
Line 220... Line 220...
220
	}
220
	}
221
 
221
 
222
	private ChannelSftp setupJsch() throws JSchException {
222
	private ChannelSftp setupJsch() throws JSchException {
223
		JSch jsch = new JSch();
223
		JSch jsch = new JSch();
224
		jsch.setKnownHosts("/root/.ssh/known_hosts");
224
		jsch.setKnownHosts("/root/.ssh/known_hosts");
225
		Session jschSession = jsch.getSession("root", "192.168.191.71");
225
		Session jschSession = jsch.getSession("root", "192.168.166.135");
226
		jschSession.setPassword("spic@2015cs");
226
		jschSession.setPassword("spic@2015static0");
227
		jschSession.setConfig("StrictHostKeyChecking", "no");
227
		jschSession.setConfig("StrictHostKeyChecking", "no");
228
		jschSession.connect();
228
		jschSession.connect();
229
		return (ChannelSftp) jschSession.openChannel("sftp");
229
		return (ChannelSftp) jschSession.openChannel("sftp");
230
	}
230
	}
231
 
231
 
Line 301... Line 301...
301
		}
301
		}
302
 
302
 
303
		channelSftp.mkdir(folderName);
303
		channelSftp.mkdir(folderName);
304
		channelSftp.cd(folderName);
304
		channelSftp.cd(folderName);
305
 
305
 
306
		channelSftp.chmod(0755, ".");
306
		channelSftp.chmod(0644, ".");
307
 
307
 
308
		for (Map.Entry<String, InputStream> streamsFileEntry : streamsFileMap.entrySet()) {
308
		for (Map.Entry<String, InputStream> streamsFileEntry : streamsFileMap.entrySet()) {
309
			channelSftp.put(streamsFileEntry.getValue(), streamsFileEntry.getKey(), ChannelSftp.OVERWRITE);
309
			channelSftp.put(streamsFileEntry.getValue(), streamsFileEntry.getKey(), ChannelSftp.OVERWRITE);
310
		}
310
		}
311
 
311