当前位置:网站首页>SSH password free login settings and use scripts to SSH login and execute instructions

SSH password free login settings and use scripts to SSH login and execute instructions

2022-07-05 05:24:00 xlbtlmy

ssh Password free login

sudo apt-get install openssh-server
ssh-keygen -t rsa -C “ Your own name or email address ”
cat ~/.ssh/id_rsa.pub >> .ssh/authorized_keys
/etc/init.d/ssh restart

Script ssh Log in and execute instructions

@echo off

ssh -o ConnectTimeout=3 -l xlbtlmy 192.168.31.78 "echo xlbtlmy | sudo -S init 0"

timeout /t 3
原网站

版权声明
本文为[xlbtlmy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050519157349.html