Score:0

How to log in to an Ubuntu VPS with public-key through vnc?

km flag

I have a VPS with a ssh key pair set on it and password authentication disabled. Today I accidentally lost my ssh access to my VPS. I was trying to change the default ssh port to port 1025. I added a bad line to the sshd_config file and failed the syntax. Instead of Port 1025 I entered Port1025 without the space in between. I immediately lost my ssh access right after restarting ssh service.

Then consulting my VPS provider they suggested to use vnc access to the server and correct the mistake.

Now the question is here when I try vnc I'm taken to a tty terminal that asks me for login credentials. But I already have disabled password authentication. Is there any way to use public-key authentication at this stage? Does this mean I have permanently lost access to my data?

Please help if you know of a solution.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.