Skip to content

Support authentication via .pem file within host configuration? #1392

@lucasrla

Description

@lucasrla

Thank you so much for creating SoS. It is such a great tool!

Quick question: is there an easy way to make the host setup/configuration work with a host that requires keypair (.pem) file? I couldn't find anything about it here in the repository nor in the host configuration docs.

Let's say I want to run a job in an EC2 instance.

Right now, I am using a workaround that is clearly suboptimal because it does not take any advantage of the great features SoS has with task statements.

Here is a toy example of what I am currently doing:

sh: expand=True
    ssh {username}@{hostname} -v -i {pem_path} -o ServerAliveInterval=180 -o ServerAliveCountMax=3 -t '{command}'

I am aware that I could edit the server SSH config in order to use another method of authentication, but I would do that only if there is no other solution.

Thanks in advance!

Metadata

Metadata

Assignees

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