moul/assh

RemoteCommand parsed but not used?

ghostiam opened this issue · 0 comments

I have a config:

hosts:
  "domain.ltd":
    RemoteCommand: "tmux -CC attach || tmux -CC || true"

but in the final .ssh/config file this field does not appear and the command is not executed on the server.

Debug output

DEBUG	generated ssh config file	{"buffer": "Host domain.ltd\n  AddKeysToAgent yes\n  IdentitiesOnly yes\n  IdentityFile ~/.ssh/id_rsa\n  Port 22\n  UseKeychain yes\n  User root\n  # HostName: domain.ltd\n  # Gateways: [direct]\n"}
DEBUG	Host	{"host": "{\"AddKeysToAgent\":\"yes\",\"IdentitiesOnly\":\"yes\",\"IdentityFile\":[\"~/.ssh/id_rsa\"],\"RemoteCommand\":\"tmux -CC attach || tmux -CC || true\",\"Port\":\"22\",\"UseKeychain\":\"yes\",\"User\":\"root\",\"HostName\":\"domain.ltd\",\"Gateways\":[\"direct\"],\"Hooks\":{}}"}
DEBUG	Proxying
DEBUG	Trying gateways	{"gateways": "direct"}
2020/09/10 16:39:14 direct
DEBUG	Preparing host object
DEBUG	Calling BeforeConnect hooks
DEBUG	Connecting to host	{"hostname": "domain.ltd", "port": "22"}
DEBUG	Connected	{"hostname": "domain.ltd", "port": "22"}