ssh remote etc

66 篇文章 0 订阅

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:~#

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值