Yes, its possible to add host entry to known_hosts automatically without give a yes word.

$  ssh -o StrictHostKeyChecking=no  -p 22  root@

Option  "-o" is used to give options in the format used in the configuration file and there is no separate command-line flag.


It's very helpful to connect the server remotely in scripts.

Another one is executing default command automatically once logged into server, for the testing I have used top -c command to run on,

option -t  is force pseudo-tty allocation. this  is used execute arbitrary screen-based programs on a remote machine.
$ ssh  -t  -o  StrictHostKeyChecking=no -p 22 root@   'top -c'