Benim için, -o LogLevel=error
daha iyiydi -q
, çünkü ikincisi önemli hata bilgilerini bastırır (daha sonra sadece çıkış kodu ile elde edebilirsiniz).
Bunu karşılaştırın (seçenekler olmadan):
[root@myserver804 myuser1]# ssh targetserver1; echo "exit code=$?"
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 RSA key sent by the remote host is
SHA256:hvtR8Dl09aUeCeG2cT5EA8b+nbCOoV6h1DUON2vE63w.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /root/.ssh/known_hosts:1735
RSA host key for targetserver1 has changed and you have requested strict checking.
Host key verification failed.
exit code=255
bununla (sessiz)
[root@myserver804 myuser1]# ssh -q targetserver1; echo "exit code=$?"
exit code=255
bununla (sadece günlük hataları)
[root@myserver804 myuser1]# ssh -o LogLevel=error targetserver1; echo "exit code=$?"
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 RSA key sent by the remote host is
SHA256:hvtR8Dl09aUeCeG2cT5EA8b+nbCOoV6h1DUON2vE63w.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /root/.ssh/known_hosts:1735
RSA host key for targetserver1 has changed and you have requested strict checking.
Host key verification failed.
exit code=255
Sonuç olarak - hala ilgili hatalarla ilgileniyorsanız, -o LogLevel=error
-q
veya-o LogLevel=error
şimdi harika çalışmak :-)