Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded hosts does not use specified user #127

Closed
rothgar opened this issue Mar 14, 2016 · 2 comments
Closed

Expanded hosts does not use specified user #127

rothgar opened this issue Mar 14, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@rothgar
Copy link

rothgar commented Mar 14, 2016

I very well may be doing something wrong (please correct my usage if I am). 😁

I am trying to expand multiple raspberry pi hosts I have on my network with a assh.yml configuration with the following.

"pi(1|2)":
  Hostname: "%h"
  User: pi
  Inherits:
    - home-net

This generates the following in my .ssh/config

Host pi(1|2)
  Port 22
  User pi
  # HostName: %h
  # Inherits: [home-net]
  # Gateways: [direct, h]

User is present in the config however when I try to ssh pi1 it still prompts for my current user's password. I also tried making the host be similar to the example config with `"pi[1-2]" but it had the same result when ssh-ing into a pi. It works with pi but that expands to match too many hosts.

@moul moul added the Bug label Mar 14, 2016
@moul moul self-assigned this Mar 14, 2016
@moul
Copy link
Owner

moul commented Mar 14, 2016

Hi @rothgar,

You have a similar issue than #121, I'm trying a big refactor to address what I call "advanced regex" with #122.

For now, I suggest you to replace your current regex with a basic one: pi(1|2) -> pi* or do not use regex but templates instead if you only have two hosts

@moul
Copy link
Owner

moul commented Mar 23, 2016

Closing this issue in favor of #122, please subscribe to the new issue to keep track of the changes

@moul moul closed this as completed Mar 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants