by Devin Yang
(This article was automatically translated.)

Published - 7 years ago ( Updated - 7 years ago )

When we use ssh to connect to the host for the first time, a fingerprint confirmation of the host key will be displayed.
Sometimes use rsync for some automated scheduling, maybe the remote host has changed and needs to be automatically allowed,
How to let ssh automatically allow fingerprints to connect without manually pressing yes in interactive mode?

The following example is to copy data from my computer to test-server, so the specified key is test-server.pem
The following is the Sample, when no parameters are added.. -oStrictHostKeyChecking=no
rsync -av --rsh='ssh -i ~/.ssh/keys/server.pem' vimrc/ ubuntu@test.example.dev:~/vimrc/
You can see that in the screen above you will be asked if you want to continue, here I answer "No".

Then, we have the same command, if we add -oStrictHostKeyChecking=no
There will be no yes/no pop-up, and the synchronization can be completed directly.
rsync -av --rsh='ssh -i ~/.ssh/keys/server.pem -oStrictHostKeyChecking=no' vimrc/ ubuntu@test.example.dev:~/vimrc/

Tags: linux

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


linux,docker

How to execute X client and X Window in Container (docker gui)

Today I will talk to you about X, not iPhone X, nor X-Men, but X Window System, He is the main graphical interface display component of the current Linux system. Since it is very easy to expand and modularize, it has been used since it was established in 1986. The X Window system adopts the Client/Server architecture, which splits the application program and the display into two. The application program of X Windows is usually called X Client, and the display is the well-known X Server. The X client communicates with the X server through the X protocol (X protocol), which is an asynchronous network communication protocol.

linux, mac, terminal, tips

How to clear the input of the current command line on the terminal of Linux or Mac?

How to clear the current command line in Linux or Mac terminal? For example, if you typed a bunch of instructions wrongly, and you want to clear them, Be sure to do the same as I used to, use the reverse key to kill slowly, we can use...

linux,system,config

Fix the problem that CentOS6.x can no longer be updated

There may still be some old programs in some places, which can only run the old system. But you want to be able to execute and install some desired packages, you may try this method. Please note that if this system is important to you, please evaluate it yourself. It is recommended that you have a Docker environment and have a backup image before trying it.

In order to provide you with better services, this website uses cookies. By continuing to browse the web, you agree to our cookies policy. To understanding