OHPC-SSH-HOSTKEY-CHANGE-FIX

From HPC Docs
Revision as of 17:00, 24 May 2022 by Admin (talk | contribs) (Created page with "ssh-keygen -R elsa.hpc.tcnj.edu ssh-keygen -R 159.91.50.30 key fingerprint You may get the error below when trying to SSH in from your Apple Mac computer, Windows PC, Linux...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ssh-keygen -R elsa.hpc.tcnj.edu ssh-keygen -R 159.91.50.30

key fingerprint

You may get the error below when trying to SSH in from your Apple Mac computer, Windows PC, Linux PC or using the "ELSA OpenHPC Shell Access" in Open OnDemand.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ECDSA key sent by the remote host is
SHA256:Tydfgvr4fQRlh2L/sqHu6gUR80O1DhDLBeL99HKaIQc.
Please contact your system administrator.
Add correct host key in /Users/ssivy/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/ssivy/.ssh/known_hosts:154
ECDSA host key for elsa.hpc.tcnj.edu has changed and you have requested strict checking.
Host key verification failed.

To resolve the issue and remove the error message, follow the instruction below based on the platform from where you are running the SSH command.

Windows

You will most likely be prompted by your SSH/terminal program to confirm the change in the SSH host key fingerprint. Select Ok/Confirm/etc. button to accept the new key.

Mac

From the Finder menu Choose Go > Go to folder... In the dialog box enter ~/.ssh and click Go

Method 1: the hammer Drag the known_hosts file to your recycle bin Close the folder and retry your SSH (it may prompt you to trust the new key, type Yes)

Method 2: the scapel Right-click on the known_hosts file and choose Open With > TextEdit Find the line that starts with elsa.hpc.tcnj.edu and delete the entire line Save the file Exit TextEdit Close the folder and retry your SSH (it may prompt you to trust the new key, type Yes)


Open OnDemand Web Portal

While the error does not prevent you from opening a terminal, you may want to follow these instructions to remove the error message. Login to Open OnDemand (http://ondemand.hpc.tcnj.edu/) Go to Files > Home Directory Click on the Change Directory button Add /.ssh to what is there (e.g. /home/hpc/ssivy/.ssh) and click the OK button


Method 1: the hammer Click the vertically stacked 3 dot pull down next to the known_hosts file Choose Delete and click OK to confirm Retry Clusters > ELSA OpenHPC Cluster Shell Access

Method 2: the scapel Click the vertically stacked 3 dot pull down next to the known_hosts file Choose Edit Find the line that starts with elsa.hpc.tcnj.edu and delete the entire line Click the Save button near the top of the window Close the browser tab with the edit window Retry Clusters > ELSA OpenHPC Cluster Shell Access