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

Environment Variables #86

Closed
nfarrar opened this issue Oct 5, 2015 · 3 comments
Closed

Environment Variables #86

nfarrar opened this issue Oct 5, 2015 · 3 comments
Assignees
Labels

Comments

@nfarrar
Copy link

nfarrar commented Oct 5, 2015

I just switched from the python version of assh to the go version. Very nice - I love the switch from ini to yaml. :) A couple questions:

The docs say environment variable expansion is supported, but the following doesn't seem to be expanded:

defaults:
  User: nfarrar
  Port: 22
  IdentityFile: $XDG_DATA_HOME/ssh/default/id_rsa

includes:
- $XDG_DATA_HOME/ssh/**/*.yml

Should this work?

@moul moul added the Bug label Oct 5, 2015
@moul
Copy link
Owner

moul commented Oct 5, 2015

@nfarrar I wanted to refactor the variable expansion by switching from Python to Golang, I probably missed to port this here

I think the one in includes will already works, but the one in IdentityFile won't yet

I will fix that

@moul
Copy link
Owner

moul commented Oct 5, 2015

Fixed in git

Can you rebuild assh and retry ?

@milkpirate
Copy link
Contributor

Ok, 3 things:

  • I still have the problem of assh not expanding env vars
  • go builds are only available untill "v2.9.1"...
  • ...and this version is not even 2.9.1

See below:

$ head -n6 ~/.ssh/assh.yml 
ASSHBinaryPath: /usr/bin/assh

defaults:
  # Defaults are applied to each hosts
  User: $USER
  Port: 22
$ echo $USER
ma-user-naim
$ wget https://github.com/moul/assh/releases/download/v2.9.1/assh_linux_amd64
$ ./assh_linux_amd64 config build
...
  SendEnv TERM=xterm
  User $USER
  ProxyCommand /usr/bin/assh connect --port=%p %h
  # ...
$ ./assh_linux_amd64 --version
assh version 2.8.0+dev (HEAD)

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

3 participants