Hey Guys, does pulumi support remote ssh into an i...
# general
Hey Guys, does pulumi support remote ssh into an instance with private key and certificate ?
Not sure, but makes me wonder what could possibly be a usecase for this? If you need to install something on EC2 instance when you spin it up, or even do some custom scripting there, say add a custom cron job, that can be done with a user data script (same concept as in Terraform).
we have to register the instance on chef server and then install some cookbook, so there are some activity before and after this remote exec.
I am also exploring if we can do this with ssh agent
With ssh-agent its working
Copy code
// Execute command on the remote instance using SSH agent
	var commandToRunExec, err3 = remote.NewCommand(ctx, "remoteExec", &remote.CommandArgs{
		Connection: &remote.ConnectionArgs{
			Host: pulumi.String(vmID.PrivateIp),
			User: pulumi.String(vm.User),
		Create: pulumi.String(commandToRun),
	if err3 != nil {
		return err3
if there is a way, we can do it without ssh-agent, that would be the better approach