I built a batch file from my windows machine that connects to a UNIX server. I Then want commands to execute in UNIX from the batch file. UNIX doesn't seem to recognize my commands after I am logged into the server. This is what I coded:
ssh SERVERNAME exit
Right now, I am just trying to make it log in and exit. I get logged into the server, but then the exit command does not execute. Does anyone know to make UNIX execute my commands after I'm logged in using this batch file?
exit isn't being executed because it isn't a command, it's a shell internal (which exit if you don't believe me). Try echo hello world instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With