Putty / Plink help

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

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

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

I am interesting on the awk command :):

kill -9 $(ps aux | awk -v s="/home/channelspy/channelspy" '$0~s {print $2}' )

me too :smiley: