Hi,

I have a running version of re:dash on GCE using the image with Bigquery.

I am trying to upgrade it with the Fabric script, but I’m not really sure how to do it.

I have tried:

fab -H localhost -u MY_USERNAME deploy_latest_release

Is tha correct? When I run it, the script asks me for the login password of my username, which I don’t use, because I ssh to the server with ssh keys.

How can I upgrade my version? I’m sure I’m missing something very simple here… but I just can’t find it out…

Thanks for your help!
Iñaki

The current version of the upgrade script is designed to be executed from a different machine that connects to your Redash instance. When you try to connect to your instance over SSH from itself, it asks for a password as it doesn’t have the SSH key.

Actually if you ssh to your instance with the -A option (SSH agent forwarding), then it will probably work.

I’ve tried running it from the instance and also from my Mac, and it is still asking for the password… and if I type it just keeps asking for it.

I run it with the following:

fab --show=debug -H HOST_IP -i /Users/MY_USERNAME/.ssh/google_compute_engine deploy_latest_release

And the output I get is the following:

DEBUG:paramiko.transport:Kex agreed: diffie-hellman-group1-sha1
DEBUG:paramiko.transport:Cipher agreed: aes128-ctr
DEBUG:paramiko.transport:MAC agreed: hmac-sha2-256
DEBUG:paramiko.transport:Compression agreed: none
DEBUG:paramiko.transport:kex engine KexGroup1 specified hash_algo <built-in function openssl_sha1>
DEBUG:paramiko.transport:Switch to new keys ...
DEBUG:paramiko.transport:Adding ssh-rsa host key for HOST_IP: KEY_IN_HEX
[104.155.121.59] Login password for 'MY_USERNAME':
DEBUG:paramiko.transport:starting thread (client mode): 0xac26690L
DEBUG:paramiko.transport:Local version/idstring: SSH-2.0-paramiko_1.17.2
DEBUG:paramiko.transport:Remote version/idstring: SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.7
INFO:paramiko.transport:Connected (version 2.0, client OpenSSH_6.6.1p1)
DEBUG:paramiko.transport:kex algos:[ ....
DEBUG:paramiko.transport:Kex agreed: diffie-hellman-group1-sha1
DEBUG:paramiko.transport:Cipher agreed: aes128-ctr
DEBUG:paramiko.transport:MAC agreed: hmac-sha2-256
DEBUG:paramiko.transport:Compression agreed: none
DEBUG:paramiko.transport:kex engine KexGroup1 specified hash_algo <built-in function openssl_sha1>
DEBUG:paramiko.transport:Switch to new keys ...
DEBUG:paramiko.transport:userauth is OK
DEBUG:paramiko.transport:Authentication type (password) not permitted.
DEBUG:paramiko.transport:Allowed methods: [u'publickey']

Does anyone know how to solve this? I’d really like to be able to upgrade redash.

Thanks
Iñaki

You’ll need to edit /etc/ssh/sshd_config and set PasswordAuthentication to yes, reload ssh (sudo /etc/init.d/ssh reload), then try running the fabric upgrade again.

Thanks John! Do you mean changing the sshd_config file in the server or in the machine I’m using to run fabric?

Thanks!

The sshd_config file on the server. Then you can run the fabric script (without the -i switch) on the server as well:

fab -H 127.0.0.1 -u yourlinuxusername deploy_latest_release

Actually I would recommend against changing the SSH configuration. Using password instead of a key is less secure and probably won’t solve your problem in this case.

I think the problem in your case is that Fabric is using your local username to SSH into the machine, which probably not the one you usually use to SSH there. Hence the authentication error.

How do you usually SSH? With Google’s tool?

I’ve finally managed to upgrade the installation, I had to do this changes to be able to use password login in the Google instance:

https://serverpilot.io/community/articles/how-to-enable-ssh-password-authentication.html

After upgrading, I have reverted the changes, I agree it’s better not to change the SSH configuration.

Thanks!