Fix SSH host key error for Tux
Mac Terminal or Putty or another SSH client or command-line SSH or
SCP should be able to connect as normal to Tux. You will need to accept a
new host key when connecting. If you have trouble accepting it or the RSA key, or get an error about a key or RSA key, try the following.
- In cmd.exe or Powershell, type in:
Where username is your username on the computer you are using.
You can also click folders in File Explorer to get to above.
- Open known_hosts file.
- Inside the known_hosts file, you need to remove all lines that say tux.cs.drexel.edu, tux, or tux with a number after it. It might be all on *one* line, separated by commas. You can just delete the entire line.
- Once you remove those and save the file, you will be able to connect and accept the new host keys.
- Go to /Users/username/.ssh where username is your account name on your Mac. To go to the .ssh folder, once you are in /Users/username/ press Command + Shift + '>/.' key which will show the hidden folders on your Mac
- Open the file 'known_hosts' in /Users/username/.ssh using textedit.
- Remove any lines that say tux.cs.drexel.edu, tux, or tux with a number after them. Make sure that you remove the full line.
- Save the file and try connecting again.
- Accept a new host key when it prompts after entering password and username.
- Run the command ssh-keygen -f "/path/to/.ssh/known_hosts" -R "tux.cs.drexel.edu"
The path is often ~/.ssh/known_hosts, but may change depending on your system.
You may also need to remove "tux" and "tuxN", where N is a number from 1-5, depending on which machines you've connected to before.
- Connect to Tux again.
- Accept the new Host Key.