Score:-1

Connection closed by port 80 ubuntu

vi flag

i have executed this code to copy a folder by my desk to my ubuntu instance

francesco@AirdiFrancesco ~ % scp /Users/francesco/Desktop/chimica  ubuntu@204.111.222.222:/home/ubuntu

only that after this command i can't enter in my instance yet when i try to log with my ssh key with following command

francesco@AirdiFrancesco ~ % ssh ubuntu@204.111.222.222 -i .ssh/privatekey.key 

it tell me this

kex_exchange_identification: Connection closed by remote host
Connection closed by 204.216.222.165 port 80

how can i enter again in my instance?

cn flag
Ray
So, the first command (`scp`) was successful but the second one (`ssh`) was not? Are you able to execute the same `scp` command again? BTW, the IP address of what you tried and the error message are different.
drMAIN avatar
vi flag
when i digit the `spc`command gives me the same error of second one (`ssh`): kex_exchange_id etc... and yes i have changed the ip manually
cn flag
Ray
Then most likely you had your public key set correctly for `ssh`/`scp` access initially. Then, you did a copy and that overwrote the `~/.ssh/authorized_keys` file. That's why it no longer works; it doesn't match the private key on your desktop. Did you allow password access to your to your Ubuntu instance? If you didn't, then you're locked out unless you have another sysadmin account on that system...
cn flag
Ray
Is this an Amazon (AWS) instance? If so, you might be able to access your instance some other way using its management console. i.e., to reset the keys. But this isn't an Ubuntu question; it's an AWS question (i.e., you need to look through its documentation, which I'm not familiar with).
drMAIN avatar
vi flag
@Ray if i delete the overwritten key could i access again to my instance? and no it's an oracle instance and the access is not with a password only with the ssh key
cn flag
Ray
When this instance was set up, you probably added a public key to it so that you can access it. You can't delete the overwritten key, because you can't access it (either by `ssh` or by `scp`). What you copied from had an `authorized_keys` file -- presumably, you can access it again if you have a **private key** that matches any public key in that file. Do you have one? I don't know much about Oracle instance; but most cloud services have some "management console" that's at a level higher so that you can fix these problems yourself. Can you ask some sysadmin for help?
ru flag
what does Port 80 have to do with anything here? Port 80 is HTTP, not SSH, and NGINX does NOT speak SSH.
Score:0
vi flag

Found the solution. only i have done is remove the key from my .ssh dir and all the setting in known_host and paste the same key that i have leave in my download folder and set chmod 600 private.key and chmod 644 public.key.pub

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.