windvalley/gossh

add feature to provide different username & passwords/keys for servers

Closed this issue · 2 comments

@windvalley thanks for creating this awesome tool.

let me how to provide different usernames for servers like providing ansible_user in ansible inventory file.

[targets]

localhost              ansible_connection=local
other1.example.com     ansible_connection=ssh        ansible_user=myuser
other2.example.com     ansible_connection=ssh        ansible_user=myotheruser

This is a great suggestion, you are welcome to send pull requests, and I will also think about how to implement this feature while keeping it simple.

A preliminary version of this feature is shown below:

Host file hosts.txt:

192.168.33.12
node1 host=192.168.33.11 port=22 user=vagrant password=vagrant keys=~/.ssh/id_dsa,~/.ssh/id_rsa passphrase=xxx foo=bar
node3.sre.im user=vagrant password=GOSSH-AES256:9cfe499133b69a6c7fc62b5b6ba72d3d8dfb4d0e7987170a40c5d50bb5d71e19

The supported host vars: host, port, user, password, keys, passphrase

Gossh command demo:
image

This version will be released soon, and later versions will consider adding server groups.