Thank you! I had some troubles but in the end I did it!
- skmaeda
Shell
option has no effect on SFTP sessions. It affects SCP sessions only.
SftpServer
option.
Shell
option.
sudo
command.
option batch continue
option confirm off
open sftp://user1@123.456.789.123/ -hostkey="....." -privatekey=".....ppk" -rawsettings Shell="sudo su - user2"
lcd C:\DEPLOY\CELRI
call /home/user2/apache-tomcat-lispa-CELIACHIATO/server/bin/shutdown.sh 2>/dev/null
rm /home/user2/apache-tomcat-lispa-CELIACHIATO/server/logs/*.*
cd /home/user2/apache-tomcat-lispa-CELIACHIATO/server/webapps
rm celiacra.war
call whoami
rm celiacra
put celiacra.war
call /home/user2/apache-tomcat-lispa-CELIACHIATO/server/bin/startup.sh 2>/dev/null
close
exit
ll
in that directory:
-rw-rw-r-- 1 user1 user1 78467988 Sep 26 15:25 celiacra.war