I am trying to connect my PC and MacBook Air via an SSH link over my internet connection. I've been researching for about a month and I have gotten to a point of failure so I decided to write a question describing my problems so others may learn.
Every time I re-install Ubuntu 20.04, the OS installs SSH keys on it's own and I don't know the passwords that protect them when I try to connect using their hashes. I want to just replace them but when I do I get the following error:
kex_exchange_identification: read: Connection reset by peer
Connection reset by xxxx:xxxx:xxxxx:Xxxxx: port 22
[Process completed]
I know a lot more now than I did before from the boards but I just can't figure out how to get around these SSH keys that are on the OS when it is born. My mac forces me into a password guessing game and it is quite frustrating because I didn't make the keys that I need to know the passwords for so it is an impossible game. If it were up to me, I would make the SSH keys without a passphrase and set my system up like they do
here
But when I follow the instructions above, this places the key in a different location and I don't need a server to add my keys to, I just want to connect one computer to another without a tether. The instructions I find on the forums never fit my situation and I am forced into a new quest that doesn't even apply to what I want to do with my computers. I would appreciate help but I realize you need your kex....
EDIT
Now I have arrived at another stop gap. I have re-established the OpenSSH connection (I run sudo service ssh status
and it says everything is good) but I still can't figure out the key puzzle.
I know how to create all the different key pairs with ssh-keygen
but as I said, when I re-establish OpenSSH, 3 key pairs are put on my system with extra permissions. I know how to delete them, copy them, and move them around but this doesn't help. The instructions tell me I need to connect to my localhost to create the ssh connection. I get to a point where I can run ssh-copy-id <username>@<IPaddress>
but this says:
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: WARNING:All keys were skipped because they already exist on the remote system.
(If you think this is a mistake, you may want to use -f option)
I can also run:
ssh-copy-id -i <key-name>.pub <username>@<IPaddress>
but this returns:
/usr/bin/ssh-copy-id: ERROR: failed to open ID file '<key-name>.pub': No such file
That is on the PC running Ubuntu 22.04.
On the Macbook Air, I go to finder, choose "Go" from the menu, select "Connect to server", enter ssh://<hostname>.local
and then I get the message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:<super-secret-AT&T-fingerprint-that-you-probably-have-to-pay-for>.
Please contact your system administrator.
Add correct host key in /Users/<sexy-boy>/.ssh/known_hosts to get rid of this message.
Offending ED25519 key in /Users/<sexy-boy>/.ssh/known_hosts:26
Host key for <my-puder>.local has changed and you have requested strict checking.
Host key verification failed.
[Process completed]
I can't get past this message on the Mac. I have added every key I've made to the "known_hosts" file but the problem is, I think, that AT&T has their own key pair on the SSH server that they provide with my service. I don't know how to add my keys to this server. I don't really understand why I need a server at all. I am simply trying to ssh tunnel from my Macbook Air to my Linux without a tether and within an encrypted connection. I'm doing this for the challenge but I have spent close to 5 years reading and typing on these idiotic websites that just try and get you to buy worthless services from overworked opensource writers that are tired of PAYING to write. I am 99% certain every step I take forward on these online projects will result in 12 steps backwards and I don't really understand why anyone would pay anyone anything on the internet.