| | |
Very Simple Scripting Question
![]() |
•
•
Join Date: Sep 2006
Posts: 2
Reputation:
Solved Threads: 0
Greetings,
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
passwd
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?
Thank you.
-J
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
passwd
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?
Thank you.
-J
try adding \. at the end to take you to the root directory.
Gabriel Villa
software development/ IT support consultant
software development/ IT support consultant
![]() |
Similar Threads
- Simple array question (C++)
- Simple algorithm question/needed (Java)
- Product List and Order Form Submit (JavaScript / DHTML / AJAX)
- Simple Class Question (C++)
- Basic scripting question (Getting Started and Choosing a Distro)
- simple msn question (Windows Software)
- Simple (I think) Code Question (PHP)
Other Threads in the Shell Scripting Forum
- Previous Thread: Scripting Please help!!
- Next Thread: Regarding getpid function
| Thread Tools | Search this Thread |





