1

Possible Duplicate:
How do I deal with a compromised server?

I've got an array of server with ip/username/password and I need to access them all, find all instances of some file and replace it with a newer version. What would be the fastest and easiet way to accomplish it without using an ftp gui software (I usually use YummyFTP).

The servers in question are all Apache and there's no ssh access.

Thanks!

Amit
  • 131

2 Answers2

2

A few points:

  • The fact that these servers are Apache servers is moot. This has no bearing on the answer.
  • If you don't have SSH access this is going to be impossible to do remotely. You are going to have to download the files, check and modify locally, and then re-upload them.

There is a possibility if you generally know the location of the files that you could write a script using ncftpget/ncftpput to download the files, check and modify them locally, then upload if changed. Depending on how many files and servers you are talking about, this is going to take forever.

I would think a better solution is to install ssh so you actually have administrator access, or if not seriously consider changing your infrastructure to allow administrator access and not just user-level access.

With ssh this would be almost trivial to perform with a small shell script.

Otherwise, buckle up, it's going to be a lot of clicking to fix your files.

Dave Drager
  • 8,455
0

Download all needed files using ncftpget and modify the file and then upload same to corresponding path using ncftpput

http://www.ncftp.com/ncftp/.

If you can provide path of file and sample content and modification details, I can help you in writing a script

Suku
  • 2,066