jsch


JSch for pbrun not working


I tried to execute pbrun using JSch. But it gets into infinite loop. I tried the same program using the JSch site examples to execute the command. I even tried session.setPty(true) before session. connect(). Still, its not working. Please help.
I've found a solution by my own research. We can use pbrun with -c option so that we launch pbrun and get the command output in one shot. In my case, i have passwordless connectivity. So It is like pbrun su - username -c 'command'
From what I read about pbrun, it seems like it starts a new shell (similarly to su).
So if by "inifinite loop" you mean that pbrun never finishes, it is (might be) correct. It never finishes, the same way su never finishes (until you issue an exit command).

Related Links

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
Creating a new file in SSH enabled system using JSCH
How to interact with the script after its execution using Jsch
java jsch -executing multiple unix commands
How to get one stream from error stream and input stream when calling a script using JSCH
SFTP using jschexception verify false sometimes fails
how to increase the jsch buffer size?
The cipher 'aes256-cbc' is required, but it is not available

Categories

HOME
yii2
image
jdo
hashmap
xmpp
gis
setup-deployment
malloc
jgroups
onelogin
convolution
medical
slurm
gnupg
volttron
iron-router
decimal
systemc
sms-gateway
beyondcompare
lldb
predix
orleans
cas
pingfederate
minitab
neo4j-spatial
ping
ejabberd-module
gsoap
skia
sql-server-2012-express
tinymce-4
javascriptcore
exuberant-ctags
copying
pim
uiswipegesturerecognizer
gammu
mmenu
wixsharp
git-merge
az-application-insights
splice
gzipstream
pdf-reactor
jvm-languages
acoustics
dotcover
jedis
logparser
alphabet
return-value
tizen-native-app
svmlight
aurelia-validation
statsd
directory-structure
qtwebview
capacity
spring-cache
ableton-live
deadbolt-2
vmware-tools
pcf
xml-attribute
nsviewcontroller
dlna
rhino-servicebus
two-factor-authentication
netmq
jmeter-maven-plugin
ionic
responsive-images
p2
bigbluebutton
system.reflection
gui-test-framework
java-metro-framework
websocket4net
bitcoinj
app42
cloud-connect
srs
typo3-neos
openlaszlo
imdbpy
google-cloud-save
coverflow
odata4j
gridcontrol
chronoforms
spring-validator
ember-app-kit
flashvars
dice
pysimplesoap
bubble-chart
gnustep
spyware
genshi
infobox
xmlspy
horizontal-accordion
netbeans-7.1
inotifycollectionchanged
celltable
.nettiers
web-architecture
genealogy
django-notification
3gp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App