Skip to content

Commit

Permalink
SSH forwarding improvements (#118)
Browse files Browse the repository at this point in the history
* Update rig for SSH forwarding fixes

* Docs

* Tweak
  • Loading branch information
kke committed Apr 19, 2021
1 parent d04830d commit 3bacbf5
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 4 deletions.
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ environment:

###### `spec.hosts[*].files` <sequence> (optional)

List of files to be uploaded to the host.
List of files to be uploaded to the host.

Example:

Expand Down Expand Up @@ -249,6 +249,51 @@ Override auto-detected OS distro. By default `k0sctl` detects the OS by reading

SSH connection options.

Example:

```yaml
spec:
hosts:
- role: controller
ssh:
address: 10.0.0.2
user: ubuntu
keyPath: ~/.ssh/id_rsa
```

It's also possible to tunnel connections through a bastion host. The bastion configuration has all the same fields as any SSH connection:

```yaml
spec:
hosts:
- role: controller
ssh:
address: 10.0.0.2
user: ubuntu
keyPath: ~/.ssh/id_rsa
bastion:
address: 10.0.0.1
user: root
keyPath: ~/.ssh/id_rsa2
```

SSH agent and auth forwarding are also supported, a host without a keyfile:

```yaml
spec:
hosts:
- role: controller
ssh:
address: 10.0.0.2
user: ubuntu
```

```
$ ssh-add ~/.ssh/aws.pem
$ ssh -A user@jumphost
user@jumphost ~ $ k0sctl apply
```

###### `spec.hosts[*].ssh.address` <string> (required)

IP address of the host
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/go-playground/validator/v10 v10.4.1
github.com/hashicorp/go-version v1.2.1
github.com/k0sproject/dig v0.1.1
github.com/k0sproject/rig v0.3.8
github.com/k0sproject/rig v0.3.15
github.com/logrusorgru/aurora v2.0.3+incompatible
github.com/mattn/go-isatty v0.0.12
github.com/segmentio/analytics-go v3.1.0+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/k0sproject/dig v0.1.1 h1:TmNoZtsCXF3jDzwSSEEwKjjD7fG5IyG0p8uvK+z1Wyo=
github.com/k0sproject/dig v0.1.1/go.mod h1:rBcqaQlJpcKdt2x/OE/lPvhGU50u/e95CSm5g/r4s78=
github.com/k0sproject/rig v0.3.8 h1:OJB5kfRemBIu0RenDL8iDzmEmtRwwVqQeS01YxQl4zY=
github.com/k0sproject/rig v0.3.8/go.mod h1:2FBHQkR4t9VveNzFF4iNuMGx9T171kKPNuS2PFunASI=
github.com/k0sproject/rig v0.3.15 h1:hq5GxDw3PiozvteAqlZZbiKMWTA5r8/0FSEeBirbXxg=
github.com/k0sproject/rig v0.3.15/go.mod h1:2FBHQkR4t9VveNzFF4iNuMGx9T171kKPNuS2PFunASI=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
Expand Down

0 comments on commit 3bacbf5

Please sign in to comment.