Allowing a web app to use SSH to start and stop services

Hi guys,

Guess this question is more for Mad Penguin.

I have recently set-up a web application to test running shout-cast servers in a more automated fashion. The application requires the SSH username and password.

My query is, I am aware I have to have a file installed (KEY) on my machine to login to the server via SSH would it be that which is preventing the application from using the SSH protocol.

Cheer Makin

Quite possibly … quick tutorial;

On the server, you will have a file in /root/.ssh called “authorized_keys2” (1), which is a text file with a list of keys of machines that are allowed to connect with no password. i.e. the key files form the authentication handshake automatically.

On your machine, you will have ~/.ssh/id_rsa and id_rsa.pub (or id_dsa and id_dsa.pub, depending on your chosen encryption algorithm)

To force a password prompt, remove (1).

To re-enable authentication via key files do;

cat ~/.ssh/id_rsa.pub | ssh root@<server> cat >> /root/.ssh/authorized_keys2

[note; not syntax checked, but in principle, add your .pub file to the end of the server’s authorized_keys2 file …]