I am trying to create a script that does 2 things. I imagine this can be done in 2 or 3 lines.
1. ssh to a server
2. execute the passwd command
here is what I am trying -
ssh -l username server
Once the script ssh's to the server, it tries to chdir to my home directory. I have no home directory on the server, only ssh access, so it gives the error - Could not chdir to home directory : No such file or directory.
The script stops there and does not execute the passwd command. If I type "passwd", it successfully executes.
Can anyone help me figure out how to do this?