1

I have a strange problem with our cluster solution on Linux. We have the following set-up in our environment. Each of these servers hosts our enterprise application.

Server1
Server2
Server3

Server1 fails over to Server2, Server2 fails over to Server3 and Server3 fails over to Server1 (Round Robin). The cluster is set-up using the RHEL clustering solution. When the fail over happens, the application mount points are moved to the other(Host) server, but the /home/sftpuser/.ssh directories are still in the original physical servers. The same user is on all the 3 Servers and hence we cannot overwrite the /home/sftpuser/.ssh directory on the Host server with the contents from the Guest Server. How can we pull files using sftp from the failed over server? Can we create a new user with his home directory in the application related mount points?

  • You know you're not limited to the home directory with sftp, right? – wurtel Feb 3 '15 at 11:05
  • Sorry. I didn't quite get your question. What I meant in my question was that sftp works based on the ssh keys inside the /home/<user>/.ssh directory and there can only be one such directory on the server. How do we get both the .ssh directories onto the Host server? Note that the same user is present on all the servers. – rahul Feb 3 '15 at 11:11
  • I just thought of a possibly stupid idea. What if we were to create three different users, one for each server. Server1-sftpuser1 Server2-sftpuser2 Server3-sftpuser3 This way we could also failover the /home/<sftpuser>/ directory and have the keys. I'll check with my sysadmin. – rahul Feb 3 '15 at 11:17
  • If you have the same user on all servers, and presumably with the same keys on all servers, then what's the problem? Perhaps edit your question to elaborate on the ssh key thing, as you didn't mention keys at all and it seems to be a key (haha) part of your question. – wurtel Feb 3 '15 at 11:18
0

I spoke to our sysadmin and adding the public keys corresponding to the Virtual IPs of the guest Servers in the authorized_keys files of all the servers did the trick. This enables the application to talk to the guest server irrespective of where they are physically running.

  • you can do it yourself - by generating ssh-keys using ssh-keygen, copying .ssh/id_dsa.pub to .ssh/authorized_keys, and then copying whole .ssh to all servers. – undefine Feb 3 '15 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.