Hi, I'm interested in recent launch of Pulumi comm...
# getting-started
Hi, I'm interested in recent launch of Pulumi commands provider. However, I'm unable to understand few concepts on it from the Docs. Mainly on the purpose of create and delete and whether it is possible to execute custom commands like ls, cat etc. on the created resource (mostly the VM). Can someone help me out
Hi @broad-lifeguard-10744, these things are indeed possible. Does this example help you, mainly the
commands from line 51?
@melodic-tomato-39005 Thanks for your reply. I was able to browse through the Internet and find some examples in Python (since I'm much familiar in that). However, I'm hitting with a SSH Handshake problem that I can't figure out how to solve.
vm_connection = command.remote.ConnectionArgs( host="x.x.x.x", user="saran", password="1Failure" ) command.remote.Command("check-cloud-init-setup", connection=vm_connection, create="until grep -q \"The system is finally up\" /var/log/cloud-init-output.log; do sleep 1;done" )
This is the sample remote commands setup I'm running in Python. I'm able to connect to this VM from my machine through CLI SSH, however the remote commands failing with the error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
I also copied my ssh public key inside the VM, but still no success
From whatever, I researched the remote commands should attempt to connect through publickey setup. But why does my attempted methods list only 'none' ?
BTW I'm using :
Copy code
pulumi : 3.6.8
Copy code
pulumi_command: 0.7.2
Did you configure your EC2 instance with the matching
and did you configure the Pulumi
like in the example?
I'm sorry, I should have informed this. I'm trying to connect to a local Ubuntu VM created through pulumi libvirt in Python. The connection arguments are created with the
as I sent to you previously.
As I told, I have no problem SSH into that VM from my server CLI, and since I've moved by public key also to the authorized list in the VM, it's not asking for password when I SSH through CLI. However,
is failing with Handshake error
Pulumi won’t attempt to use the key because the connection is only configured to use a password (the one you pasted above). I’m not sure why the password wouldn’t work, though.
So, the attempted methods has only none because I haven't supplied the private key of my server in my connection.
Yes, that's even I thought when supplying the password. Is there any way to debug the Pulumi remote APIs to see what's happening
You could enable verbose logging as described here.
Thanks for troubleshooting guide @melodic-tomato-39005. PFA the pulumi up for the above remote command in -v=9 verbose.
These logs confirm that SSH auth is not even attempted but don’t say why. Would you mind opening an issue at https://github.com/pulumi/pulumi-command/issues?
@melodic-tomato-39005 Sorry for the delay in response. I've fixed the issue. The problem was with the default SSH configuration that comes with Ubuntu cloud image.
The config had
as NO. This is why the Remote Command SSH was failing. Once I fixed this, it started working.