how do I ssh to linode from the finnix boot in order to copy my local VM over to linode

I am trying to copy my local VM over to linode. I hace created the new raw disk and the configuration profile. I booted up the Finnix 64 bit. When i try to ssh fro finnix to linode root user I get permission denied( this is via the temporary root password set)

6 Replies

We recently updated our Rescue Mode environment, and our documentation is a bit behind on the new process. In order to successfully ssh into your server, you'll have to run the below commands while booted into Rescue Mode.

From your Lish console:

passwd

sed -i -e 's/#PasswordAuthentication yes/PasswordAuthentication yes/g' /etc/ssh/sshd_config

sed -i -e 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config

service ssh start

From your Local Machine:

ssh-keygen -R $LinodeIP

Once these steps are completed, you should be able to copy your disk over ssh:

ssh root@$LinodeIP "dd if=/dev/sda " | dd of=/Your/File/Path/linode.img

Thank you for the Reply.. Even with the above steps I am not able to cope over my file..

the command that I am giving on my local machine is:

dd if=/dev/sda | pv | gzip -9 | ssh root@$LinodeIP "gzip -d | dd of=/dev/sda"

I am still getting the permission denied when I give the root password for the linode glish console.

I'm not able to recreate the issue you're having, so let's try a few things:

  1. Ensure the root password you're using is the same one you set in step 1 with the passwd command.

  2. From Lish, while logged in as root, double-check your /etc/ssh/sshd_config file after running through the above steps to make sure those changes took hold. Specifically:

  • PasswordAuthentication should be set to "yes"
  • PermitRootLogin should also be set to "yes"

If not, you'll want to edit those manually. If these lines are commented out, be sure to uncomment them (remove the # sign), and then save:
#Commented
Uncommented

I can't believe that I spent hours working with the existing documentation, then I accidentally found this thread!

Yes, ssh on Lish doesn't allow PasswordAuth, and PermitRootLogin as default startup. editing the sshd_config finally let me in!

Linode - you should really consider updating that document. Time is important, and we trust you.

Thanks for posting this solution and thanks for the question in the first place.

@smozgur I'm glad you were able to get in! We'd like the take a look at the guide you were using. Would you mind linking it here? This way, we can make sure we know which guide you are referring to.

Lish doesn't allow PasswordAuth, and PermitRootLogin as default startup.

Would you also be able to provide us with the error message you received? Once you've connected to your account via the Lish gateway, you should be able to log in with the username and password of the Linode you select. I'm not sure if this is the guide you were using, but the login steps via terminal application are outlined there.

@rdaniels - I was downloading my Linode backup as disk image, which I have done many times before. Still I followed the most recent documentation about it:
https://www.linode.com/docs/platform/disk-images/copying-a-disk-image-over-ssh/#download-a-disk-over-ssh

The error when you try to SSH that these settings are not enabled is "Permission denied (publickey)".

Everything looks correct in the documentation, except, as I said, it doesn't mention that Finnix SSH settings avoids Password authentication and likely also Root login unless you set it as you explained above. This setting is absolutely wrong as default, so I suggest you to change the Rescue environment to have this settings are enabled as default or alternatively change the documentation I gave the link above.

Thanks again for providing a solution in this page.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct