Im trying
C:\Program Files\PUTTY\plink.exe mysite.net -l username -pw mypassword -m restart.sh
But the login / password are never sent. If I remove the -m restart.sh it will login
I need the command inside restart.sh issued after the login password is completed.
THanks
ygemici
2
which command contains in restart.sh ?
the command is
./restart
which is
#!/bin/bash
#killall channelspy
kill -9 `ps auxwww | grep /home/channelspy/channelspy | grep -v grep | sed 's/ */ /'| cut -d " " -f 2`
sleep 1
I did not create the ./restart but I use it to restart a process when it hangs up
ygemici
4
retry to change with
kill -9 $(ps aux | grep /home/channelspy/channelspy | grep -v grep | awk {'print $2'} )
So it appears we wont see the actual login and password activity, but it does login
Thanks for you time, your the man
rdcwayx
6
I am interesting on the awk command :):
kill -9 $(ps aux | awk -v s="/home/channelspy/channelspy" '$0~s {print $2}' )