I have an ubuntu server and a windows XP client running Cygwin. The server ssh
's into the client and tries to execute a shell script with some params, with the following command:
ssh user@IP_ADDR 'sh /home/user/project/clientside 2 5 7 6 9 5 7 IP_ADDR'
where IP_ADDR
is the IP address of client.
However, while doing so, I get the following error:
Access is denied.
Thinking this might be a user permissions error, I tried running sh /home/user/project/clientside 2 5 7 6 9 5 7 IP_ADDR
on the client, on Cygwin, while logged in as user
.
This works as expected.
Then I thought that this might be an error with the login that I use when I ssh into the client. So I executed this instead:
ssh user@IP_ADDR 'whoami'
and got back user
.
This happened even after I did chmod -R 777 /home/user/project
on the client, in Cygwin.
For kicks, I got on Cygwin on the client and did ssh localhost
and manually executed sh /home/user/project/clientside 2 5 7 6 9 5 7 IP_ADDR
.
This worked as expected.
However, when I did ssh IP_ADDR
from Cygwin and did ssh localhost
and manually executed sh /home/user/project/clientside 2 5 7 6 9 5 7 IP_ADDR
, I get the same Access is denied.
error.
Why is this happening? How can I fix this?
By the way, both the server and the client have each other's rsa public key for passwordless ssh