在iTerm2里创建该连接的profile 现在已经可以在iTerm2里通过命令/usr/local/bin/sshpass -p 123456 ssh jeremy@10.211.55.5连接到windows的powershell,其中123456是windows用户jeremy的密码,10.211.55.5是windows的密码。为了连接方便,在iTerm2里创建一个新的p
pipx install keyring keyring set ssk_askpass askpass#Password for 'askpass' in 'ssh_askpass': <Enter Password>#Verify herekeyring get ssh_askpass askpass#<Should print your password> Create aaskpass_keyring_util.batwith the content:
echo 下面代码,在管理员权限cmd中运行,在管理员权限powershell中运行均可。 echo 如果使用powershell remoting远程。本机,远程机,都要用管理员权限运行一遍。 "C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe" -command "Set-ExecutionPolicy -ExecutionPolicy Unrestricted" "C:\WINDOWS\syswow64\windowspo...
if ( $temp2.contains('no sshpass') -or ($temp2 -eq '') ) { Write-Error '此linux主控机上没有 sshpass程序' exit 988 } Write-Verbose '使用ssh密码,连接开始' $sshpass命令 = @" sshpass -p '$(${当前被控机}.当前密码)' ssh -o StrictHostKeyChecking=no root@${目的ip地...