ndenev / mpssh

Mass Parallel SSH
120 stars 21 forks source link

not using the ssh config file #24

Open linbynd opened 9 years ago

linbynd commented 9 years ago

The program looks great and been trying it out. But seems to be that it does not use the current .ssh/config file for host checking.

ndenev commented 9 years ago

Mpssh itself does not use these ssh config files, it merely execs ssh, and ssh should use them. What exactly are you seeing?

linbynd commented 9 years ago

I have a ssh config file for servers and I use different username for hosts which are defined in the config. when I put just the alias name its picking up from the config file however it does not pick the user from the config file. I have to explicitly define the user it in .mpssh/hosts.

ubuntu@             curie-alpha-ha-ub-1 -> ubuntu
ec2-user@        curie-alpha-tomcat-amz-2 -> ec2-user
ec2-user@        curie-alpha-tomcat-amz-3 -> ec2-user
  ubuntu@             curie-alpha-ha-ub-2 -> ubuntu
ec2-user@        curie-alpha-tomcat-amz-1 -> ec2-user
ec2-user@        curie-alpha-tomcat-amz-4 -> ec2-user
  ubuntu@           curie-alpha-solr-ub-1 -> ubuntu
ec2-user@        curie-alpha-tomcat-amz-7 -> ec2-user
ec2-user@        curie-alpha-tomcat-amz-8 -> ec2-user
ec2-user@        curie-alpha-tomcat-amz-5 -> ec2-user

╭─linbynd at punc02p59rgg3qd in ~/.mpssh using ‹ruby-2.2.1› 15-06-11 - 3:19:27
╰─○ cat hosts
%curie
ubuntu@curie-alpha-ha-ub-1
ubuntu@curie-alpha-ha-ub-2
ec2-user@curie-alpha-tomcat-amz-1
ec2-user@curie-alpha-tomcat-amz-2
ec2-user@curie-alpha-tomcat-amz-3
ec2-user@curie-alpha-tomcat-amz-4
ec2-user@curie-alpha-tomcat-amz-5
ec2-usercurie-alpha-tomcat-amz-6
ec2-user@curie-alpha-tomcat-amz-7
ec2-user@curie-alpha-tomcat-amz-8
ubuntu@curie-alpha-solr-ub-1
ndenev commented 9 years ago

Ok, this might be because mpssh always supplies a username, even if you don't supply one it uses the current user username.

dbv-rl commented 5 years ago

yes, just stumbled over this as well... as it's roughly now having it's 4th birthday.

ecraven commented 3 years ago

any way to fix this? this makes it unusable for my use case, and it looks like a great tool otherwise!

Spreadcat commented 3 years ago

I wouldn't count on it....