jsch


jsch + running multiple command in shell after SU and then close channal


My requirement is as follow:
I have to login to Unix box using my credentials and once login, I have to do su to different user. I need to provide password and reason for scsu command.
once su successful, I have to run set of commands one after another as that user.
On completion of executions, close channel and session both.
I tried to use Shell channel but I am able to fire scsu only ... need help to complete remaining requirement of executions of command and closing channel

Related Links

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
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

Categories

HOME
twitter
ionic-framework
date
isabelle
relative-path
hp-exstream
lodash
grep
infragistics
windows-server
django-imagekit
portia
slurm
modelica
vb.net-2010
phaser
dosgi
evopdf
openedx
nas
conemu
cloudhub
sox
dcevm
format-specifiers
log4js-node
wtx
windowbuilder
bluestacks
iframe-resizer
yadcf
textmate
mmenu
android-ble
libraries
lumberjack
awt
babel-core
auto-update
react-scripts
worksheet
fancybox-2
nsarray
knpmenubundle
account-kit
eventkit
instant
underscore.js-templating
bgp
pickadate
ios4
reactive-banana
jms2
intel-fortran
comobject
qdialog
atk4
content-length
computer-algebra-systems
security-testing
emailrelay
drawbitmap
arcanist
event-bubbling
sankey-diagram
e10s
bigbluebutton
gwidgets
xc16
asp.net-dynamic-data
phalanger
issuu
xojo
datagridviewcolumn
mcts
aqtime
jmapviewer
simba
trusted
rdoc
hgsubversion
work-stealing
subscript
gcj
rfc1123
pyinotify
html-input
dmx512
suppress
gin
compiler-specific
brewmp
text-coloring
grid-system
uiq3

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