Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Suggest to add "user" into Machine spec #276

Description

@brightzheng100

I found that the SSH pub key is hardcoded to be in /root/.ssh which indicates that the SSH user is actually root.

In this case, if I run footloose ssh without specifying the user, like footloose ssh root@host xxx, the user will be retrieved by current OS user, which doesn't make sense in most of the cases:
https://github.com/weaveworks/footloose/blob/master/ssh.go#L37-L51

So I'd suggest to add a new element in Machine spec, with "root" as the default value, like this:

// Machine is a single machine.
type Machine struct {
	spec *config.Machine

	// container name.
	name string
	// container hostname.
	hostname string
	// container ip.
	ip string
	// container user, defaults to "root".
	user string

	runtimeNetworks []*RuntimeNetwork
	// Fields that are cached from the docker daemon.

	ports map[int]int
	// maps containerPort -> hostPort.
}

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions