ssh remote etc

卞嘉许
2023-12-01

1. remote shell script 

ssh root@192.168.1.2  "sh  /tmp/upd.sh && sync  && reboot"
 

2. 

ssh 强制password, 不使用key

ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no example.com


3. StrictHostKeyChecking=no 
  
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\> ssh root@192.168.3.2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ECDSA key sent by the remote host is
SHA256:lneUIiVoBXdiQk83QGrSFZYnirNC8ZiFVI3uAW8qQMw.
Please contact your system administrator.
Add correct host key in C:\\Users\\uie75906/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\uie75906/.ssh/known_hosts:3
ECDSA host key for 192.168.3.2 has changed and you have requested strict checking.
Host key verification failed.


PS C:\> ssh -o StrictHostKeyChecking=no   root@192.168.3.2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ECDSA key sent by the remote host is
SHA256:JNcsCG8DTFATsCEYf9Ru3QGJSzOqJrnQ2LLFnTWpYT4.
Please contact your system administrator.
Add correct host key in C:\\Users\\uie75906/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\uie75906/.ssh/known_hosts:3
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Agent forwarding is disabled to avoid man-in-the-middle attacks.
X11 forwarding is disabled to avoid man-in-the-middle attacks.
root@remotehost:~#

 类似资料:

相关阅读

相关文章

相关问答