Score:0

SSH link between Ubuntu 20.04 and a MacBook Air

gr flag

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.

ar flag
Edit your question and add the full path of the folder where these keys are stored as well as the file names of these keys. Without specifics we don't know what you are talking about.
Shy Shy Teddy avatar
gr flag
for some reason I don't think that is right to do.
David Anderson avatar
us flag
What version of macOS/OS X is the Mac using?
Score:0
gr flag

I have been searching more and this finally popped up. I'm still working on this problem but I have re-installed several times so I am not at the same error as I posted earlier. This seems like the best guide for dummies from a fresh install of Ubuntu 22.04.

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.