-
get the rsa key of your server, where
server_ip
is your server’s IP address, such as192.168.2.1
:$ ssh-keyscan -t rsa server_ip
Sample response:
# server_ip SSH-2.0-OpenSSH_4.3 server_ip ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwH5EXZG...
-
and on the client, copy the entire response line
server_ip ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwH5EXZG...
, and add this key to the bottom of your~/.ssh/known_hosts
file:server_ip ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAqx9m529...(the offending key, and/or the very bottom of the `known_hosts` file) server_ip ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAwH5EXZG... (line you're adding, copied and pasted from above)
Related Posts:
- Git: How to solve Permission denied (publickey) error when using Git?
- ssh: The authenticity of host ‘hostname’ can’t be established
- How to solve “sign_and_send_pubkey: signing failed: agent refused operation”?
- Git error: “Host Key Verification Failed” when connecting to remote repository
- What’s the difference between authorized_keys and authorized_keys2?
- What significance does the user/host at the end of an SSH public key file hold?
- Why does my OpenSSH key fingerprint not match the AWS EC2 console keypair fingerprint?
- How do I validate an RSA SSH public key file (id_rsa.pub)?
- SSH Allow Password For One User, Rest Only Allow Public Keys [duplicate]
- Putty: Getting Server refused our key Error
- Copying a local file from Windows to a remote server using scp
- ssh “permissions are too open” error
- ssh: The authenticity of host ‘hostname’ can’t be established
- Permission denied (publickey,keyboard-interactive)
- How to deal with “Pseudo-terminal will not be allocated because stdin is not a terminal.”
- What is actually in known_hosts?
- ‘heroku’ does not appear to be a git repository
- How to fix request failed on channel 0
- How to scp in Python?
- Forward X11 failed: Network error: Connection refused
- PuTTY PSCP error “Local to local copy not supported” when username contains a slash
- Starting ssh-agent on Windows 10 fails: “unable to start ssh-agent service, error :1058”
- Convert PEM to PPK file format
- Copying files using rsync from remote server to local machine
- How to read iPhone files without jailbreaking?
- SSH to Vagrant box in Windows?
- How to use Sublime over SSH
- Use qdel to delete all my jobs at once, not one at a time
- Automating command/script execution using PuTTY
- Public and Private Keys are Incorrect for user
- How to automate SSH login with password?
- ssh returns “Bad owner or permissions on ~/.ssh/config”
- How do I change my private key passphrase?
- Create a public SSH key from the private key?
- How do diff over ssh?
- SSH use only my password, Ignore my ssh key, don’t prompt me for a passphrase
- ssh-agent forwarding and sudo to another user
- Non interactive git clone (ssh fingerprint prompt) [duplicate]
- How to check sshd log?
- What does “Warning: untrusted X11 forwarding setup failed: xauth key data not generated” mean when ssh’ing with -X?
- Is my password compromised because I forgot to hit Enter after ssh username?
- How do I make ssh fail rather than prompt for a password if the public-key authentication fails?
- ssh-keygen does not create RSA private key
- OpenSSH: Difference between internal-sftp and sftp-server
- how do you create an ssh key for another user?
- SSH Suddenly returning Invalid format
- How can I prevent the warning No xauth data; using fake authentication data for X11 forwarding?
- How to recover from “Too many Authentication Failures for user root”
- SFTP logging: is there a way?
- Login without running bash_profile or bashrc
- How do I do Multihop SCP transfers between machines?
- scp without known_hosts check
- How can I run arbitrarily complex command using sudo over ssh?
- Add comment to existing SSH public key
- ssh connection takes forever to initiate, stuck at “pledge: network”
- What is the benefit of not allocating a terminal in ssh?
- bad ownership or modes for chroot directory component
- Why Block Port 22 Outbound?
- Ansible stuck on gathering facts
- Is it possible to use rsync over sftp (without an ssh shell)?
- Why is SSH password authentication a security risk?
- ssh : Permission denied (publickey,gssapi-with-mic)
- Could not open a connection to your authentication agent
- How to establish ssh key pair when “Host key verification failed”
- AWS – Disconnected : No supported authentication methods available (server sent :publickey)
- Using putty to scp from windows to Linux
- mysql_config not found when installing mysqldb python interface
- SSH -X “Warning: untrusted X11 forwarding setup failed: xauth key data not generated”
- X11 forwarding request failed on channel 0
- “Key is invalid” message on GitHub
- mysql_config not found when installing mysqldb python interface
- Pseudo-terminal will not be allocated because stdin is not a terminal
- How to download a file from server using SSH?
- connect to host localhost port 22: Connection refused
- channel 3: open failed: connect failed: Connection refused
- How to specify the private SSH-key to use when executing shell command on Git?
- Getting stty: standard input: Inappropriate ioctl for device when using scp through an ssh tunnel
- Copying files from server to local computer using SSH
- key_load_public: invalid format
- Differences between SFTP and “FTP over SSH”
- EC2 ssh Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
- Configure WordPress to connect to Mysql DB using SSH tunneling
- Failure to establish connection when provisioning via ansible-playbook server.yml
- Upgraded to php7.0, now ssh updates don’t work [closed]
- enable SFTP via SSH keys in wordpress
- Unable to update WordPress or install plugins/themes
- SSH Server with WordPress
- AWS Lightsail WordPress – connect to database on instance using mysqli
- How To Upload Existing WordPress Site To WordPress Multisite Using SSH
- SSH vs WordPress
- Configuring WordPress permissions for easy updates
- SSH git — How to pull a folder from repo, but not delete other directories & files on deployment server [closed]
- How do I tell Git for Windows where to find my private RSA key?
- Can I nohup/screen an already-started process?
- how to disable SSH login with password for some users?
- How can I automatically change directory on ssh login?
- What is a good SSH server to use on Windows? [closed]
- SSH keypair generation: RSA or DSA?
- Does getting disconnected from an SSH session kill your programs?
- How can I fully log all bash scripts actions?