We run an application which creates a lot of directories. Once the application completes we do not need those directories. Hence we want to delete them as they are consuming lots of space. The problem is this application is running on a remote server. I have to write a shell script that will delete those directories from the remote server. I tried the ssh commandssh username@domain.com 'rm /some/where/some_file.war' but it asked for a password. Then I followed the below stepSetup password-less keys then add the command as part of the ssh command. See: http://www.dotkam.com/2009/03/10/run-commands-remotely-via-ssh-with-no-password/I am able to to do all steps as described but at last it is again asking for a password. How can I use ssh without a password?
automate file delete in remote server
ssh;authentication