OHPC-SSH-HOSTKEY-CHANGE-FIX: Difference between revisions

From HPC Docs
Jump to navigation Jump to search
(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...")
 
No edit summary
Line 1: Line 1:
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.
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.
Line 16: Line 12:
SHA256:Tydfgvr4fQRlh2L/sqHu6gUR80O1DhDLBeL99HKaIQc.
SHA256:Tydfgvr4fQRlh2L/sqHu6gUR80O1DhDLBeL99HKaIQc.
Please contact your system administrator.
Please contact your system administrator.
Add correct host key in /Users/ssivy/.ssh/known_hosts to get rid of this message.
Add correct host key in ~/ssivy/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/ssivy/.ssh/known_hosts:154
Offending ECDSA key in ~/.ssh/known_hosts:154
ECDSA host key for elsa.hpc.tcnj.edu has changed and you have requested strict checking.
ECDSA host key for elsa.hpc.tcnj.edu has changed and you have requested strict checking.
Host key verification failed.
Host key verification failed.
Line 28: Line 24:


=== Mac ===
=== Mac ===
From the Finder menu
Open a terminal window (you're probably already using the terminal window)
Choose Go > Go to folder...
Type the following before at the terminal prompts.
In the dialog box enter  ~/.ssh  and click Go
<pre>
 
ssh-keygen -R elsa.hpc.tcnj.edu
Method 1: the hammer
ssh-keygen -R 159.91.50.30
Drag the known_hosts file to your recycle bin
</pre>
Close the folder and retry your SSH (it may prompt you to trust the new key, type Yes)
Retry your SSH command again.<br>
 
You will probably be asked to accept/confirm the SSH host key fingerprint. Type <code>yes</code> and press the ENTER or RETURN key. This should only happen the first time after running the <code>ssh-keygen</code> commands.
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 ===
=== 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.
While this error doesn't prevent you from opening an <code>>_ELSA OpenHPC Cluster Shell Access</code> terminal window, you will get the error message each time. To get rid of that message, follow these steps.
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


Type the following at the Linux command prompt.
<pre>
ssh-keygen -R elsa.hpc.tcnj.edu
ssh-keygen -R 159.91.50.30
</pre>


Method 1: the hammer
Type <code>exit</code> and close the browser tab with the terminal.
Click the vertically stacked 3 dot pull down next to the known_hosts file
Open a new <code>>_ELSA OpenHPC Cluster Shell Access</code> terminal.<br>
Choose Delete and click OK to confirm
You may see a message about adding a new host key. This should only happen the first time after running the <code>ssh-keygen</code> commands.
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

Revision as of 20:22, 24 May 2022

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 ~/ssivy/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in ~/.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

Open a terminal window (you're probably already using the terminal window) Type the following before at the terminal prompts.

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

Retry your SSH command again.
You will probably be asked to accept/confirm the SSH host key fingerprint. Type yes and press the ENTER or RETURN key. This should only happen the first time after running the ssh-keygen commands.

Open OnDemand Web Portal

While this error doesn't prevent you from opening an >_ELSA OpenHPC Cluster Shell Access terminal window, you will get the error message each time. To get rid of that message, follow these steps.

Type the following at the Linux command prompt.

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

Type exit and close the browser tab with the terminal. Open a new >_ELSA OpenHPC Cluster Shell Access terminal.
You may see a message about adding a new host key. This should only happen the first time after running the ssh-keygen commands.