Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Just had a quick question about using ClusterSSH(cssh) with a homegrown ssh-like/ssh-clone application which we use internally to connect to remote machines.

I tried using the ssh = /path/to/ssh_clone override in $HOME/.csshrc or /etc/csshrc (or even passing it via -C). Unfortunately running cssh with debug shows that it is still trying to connect to the remote machines as ssh -l user machine_ip instead of ssh_clone -l user machine_ip.

Any thoughts/suggestions on how to work around this would be greatly appreciated. TIA.

Edit: Version info

$ cssh -v
Version: 4.01_02
share|improve this question
add comment

2 Answers

If your ssh_clone has the same basic calling semantics as ssh (and it looks like it does), a simple alternative approach would be to put ssh_clone in its own directory, rename it to ssh, and run cssh with that new directory at the beginning of your PATH. As long as cssh searches your PATH for ssh, it will find your cloned version first and will use that.

If you frequently run cssh from the command line, a simple wrapper script could be used so normal invocations of ssh still get the correct program:

#!/bin/sh
# cssh_wrapper.sh
PATH="/path/to/ssh_clone_dir:${PATH}"
export PATH
cssh "$@"
share|improve this answer
    
True. Although that didn't work as expected, since it seemed to be complaining about illegal arguments being passed in - have to look a bit closer. Also, since I would like to override some other params in a .csshrc or $HOME/.clusterssh/config file, it would be great if I could get cssh to recognize/read them. –  decimus phostle Nov 13 '12 at 17:32
add comment

Double check that you are modifying the correct file.

When you run cssh it will automatically write out a ~/.csshrc file. On my version this files has 48 lines. Instead of editing a new file you have to modify the line that starts with ssh=.

Verify that the configuration is correctly set with cssh -u | grep ^ssh=.

If you are trying to modify /etc/csshrc, I am pretty sure that the .csshrc in the user's home directory (which is already there and has the ssh= line) is overriding the global config.

If none of these help, delete all these config files, run cssh once (no arguments needed), and then modify the generated .csshrc in your home directory.

Update: And since it seems that it still doesn't work, try verifying if your version is not patched or something. Try grep parse_config_file $(type -p cssh) for a hint.

share|improve this answer
    
Unfortunately a $HOME/.csshrc is not being created for me(when I run cssh - with no args or otherwise). Setting ssh = foo in a self-created $HOME/.csshrc is not taking either - at least as suggested by cssh -u. –  decimus phostle Nov 9 '12 at 14:56
    
Interestingly, although the man pages do not mention it, I do have a $HOME/.clusterssh/config file which seems to have a bunch of .csshrc-like overrides. Unfortunately changing ssh = ... there did not take either. –  decimus phostle Nov 9 '12 at 15:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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