jsch


I'm trying to use Jsch to establish an SSH connection in Java.I got the Exception com.jcraft.jsch.jschexception unknownhostkey


jsch.setKnownHosts(new FileInputStream(SSHHostKey));
jsch.addIdentity(SSHKey);
session = jsch.getSession(user, host, port);
if (hostKey == null)
{
session.setConfig("StrictHostKeyChecking", "no");
}
session.setPassword(pass);
session.connect();
channel = session.openChannel("sftp");
channel.connect();
sftp = (ChannelSftp) channel;
still I get the same exception.
Can anybody tell me how to get/retrive HostKey? I am using Windows.

Related Links

How to add timeout when use JSch to execute a shell command which need user input later
Decreased speeds when using JSch put compared to scp
JSCH Channel Is Not Opened (New)
What the situation will make channel.getExitStatus() return 1
JSch read local log file
JSCH setCommand is not working
com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 11 No appropriate prime between 1024 and 1024 is available. en
I'm trying to use Jsch to establish an SSH connection in Java.I got the Exception com.jcraft.jsch.jschexception unknownhostkey
com.jcraft.jsch.JSchException: failed to send sftp request
JSch for pbrun not working
JSCH read from input stream hangs from time to time
Hundreds of Apache SSHD clients leave hundreds of OpenSSH daemon processes running
Jsch - ssh connection through ssh tunnel
Changing password using Jsch and ChannelExec
how to delete local file using jsch after file is sent to remote SFTP server directory
com.jcraft.jsch.JSchException: Auth fail error

Categories

HOME
ms-access
openstack
mockito
ngrx
tinymce
view
include
fft
jira
icloud
ios-charts
portia
awesome-wm
tomcat6
kentor-authservices
imacros
modelica
apache-cayenne
vb.net-2010
circuit
caml
uitypeeditor
libtiff
foselasticabundle
after-effects
beyondcompare
google-cloud-speech
alpine
predix
grails3
conemu
clickonce
ehcache
facebook-instant-articles
jndi
shopware
poltergeist
fifo
log4js-node
libuv
newline
bpel
unboundid
lightswitch-2013
galsim
ioio
lxd
fusionpbx
devextreme
twitch
document.write
janrain
arena-simulation
qcombobox
celery-task
domain-model
dotnetzip
git-diff
worker-thread
kbuild
qtwebview
nbconvert
django-scheduler
quartz-composer
gnome-shell-extensions
root-framework
angular-cache
gridpane
file-writing
google-web-starter-kit
nsviewcontroller
pagedlist
oauth2client
freelancer.com-api
jfugue
eclipse-clp
wyam
drawbitmap
responsive-images
jsapi
dd
qpainter
network-interface
mdt
google-reader
ceil
heisenbug
meteor-velocity
jsctypes
excel-2003
gwt-rpc
eclipse-templates
stage
deobfuscation
heartbeat
floating
sudzc
zend-translate
infrastructure
gin
simpletest
sustainable-pace
thread-local-storage
mediarss
misv

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App