clustershell icon indicating copy to clipboard operation
clustershell copied to clipboard

`ssh_user: root` only for certain hosts / connections

Open skwde opened this issue 1 year ago • 4 comments

To my understanding the way to do this is to implement a specific run mode, i.e. a file clush.conf.d/root-ssh.conf

[mode:root-ssh]
ssh_user: root
ssh_options: -i <identitiy file to use> -oStrictHostKeyChecking=no

I see two problems with this

  1. I always have to explicitly use --mode root-ssh
  2. It is not possible to specify which nodes should use --mode root-ssh and which should use normal ssh in a single command.

skwde avatar Jan 31 '24 10:01 skwde

Indeed there is no easy way at the moment to specify different ssh options depending on the host.

Could you use ssh config file to achieve the same thing, until this feature is available in ClusterShell?

degremont avatar Jan 31 '24 13:01 degremont

I would like to avoid making changes to ssh config because this would require either that all clustershell users make the change or I make a modification on all machines.

For now I go with ssh as root to all machines.

Are there any plans when / if something like run modes for host groups are implemented?

skwde avatar Feb 01 '24 03:02 skwde

Thanks @skwde for clearly describing your issues / use cases!

Are there any plans when / if something like run modes for host groups are implemented?

It would indeed be a natural improvement for clush to support automatic run mode selection by node sets (and groups) as defined in clush.conf for example.

Let us think about the best way to implement this.

thiell avatar Feb 01 '24 05:02 thiell

Perfect. Just found a related issue: https://github.com/cea-hpc/clustershell/issues/407

skwde avatar Feb 01 '24 12:02 skwde