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

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
How to pause/resume procedure while/after upload file by ChannelSftp
jsch + running multiple command in shell after SU and then close channal
NGit/Nsch Generating SSH Keypair (c# Jgit)

Categories

HOME
activiti
homebrew
dot
cross-browser
windows-server
django-imagekit
directx
contact
dacpac
google-translate
etl
windows-azure-storage
dtrace
fallback
workload-scheduler
telephony
lucene.net
google-pagespeed
amazonsellercentral
jasonette
extjs5
language-agnostic
format-specifiers
trading
internet-explorer-9
log4js-node
kendo-datasource
google-rich-snippets
iframe-resizer
phonegap
code-contracts
subset-sum
bower-install
gesture
libraries
bootstrapper
mesos-chronos
particles.js
email-templates
android-tabhost
sas-jmp
taffy
appcompat
pango
react-scripts
promela
return-value
powercli
magma
dtexec
python-cryptography
redundancy
smart-table
messenger
spring-android
angular-cache
elements
intrusion-detection
blackberry-10
qcustomplot
design-by-contract
unity-networking
ora-00900
retina
rgeo
interrupted-exception
processmodel
mmc
streambase
coldbox
java.util.concurrent
relocation
file-copying
onactivityresult
android-radiobutton
eol
mysql-error-1062
android-2.2-froyo
gnu-smalltalk
odata4j
interface-orientation
cassini-dev
browser-detection
libstdc++
trusted
javaspaces
enter
bigcouch
gwt-ext
netbeans-7.1
html-input
visitor-statistic
google-friend-connect
suppress
mediarss
private-members

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