LinuxCommand

2018-04-08  本文已影响0人  LiamBao
listening on 0.0.0.0 port 10222.
exp_cmd="set timeout 10 
spawn ssh $login@$target_ip -p 22 -o \"ProxyCommand=ssh -p 22  root@$jump_ip -W %h:%p\";
expect \"password\"
"
expect -c "$exp_cmd" > $conf_log
─ One layer of encryption
═ Two layers of encryption
┏━━━━━━━━━━━━━━┓          ┏━━━━━━━━━━━━━┓          ┏━━━━━━━━━━━━━━━━━┓         
┃  SSH client  ┃══════════┃  Jump host  ┃──────────┃  Target server  ┃
┗━━━━━━━━━━━━━━┛          ┗━━━━━━━━━━━━━┛          ┗━━━━━━━━━━━━━━━━━┛



ssh liam@10.10.10.167 -p 22 -o ProxyCommand='ssh -p 22 root@192.168.234.4 -W %h:%p'

scp -o ProxyCommand="ssh $jump_host nc $host 22" $local_path host:$destination_path


scp  -o ProxyCommand="ssh -i /root/.ssh/ssh_rsa root@192.168.234.4 -W %h:%p" /tmp/file liam@10.10.10.166:root/file
echo "74gwRasdClz9kjvw" | openssl enc -d -base64 -aes-256-ctr -nopad  \ 
      -nosalt -k "$(sha256sum "/root/.pki/cert.seed" |  \
      cut -d' ' -f1 | tr -d "\r\n")"

 openssl enc -e    "encrypt pwd"
keytool -printcert -file ca_cert.cer |  \
    egrep SHA1 | cut -d ':' -f 2-
keytool -printcert -file ca_cert.cer | egrep Issuer \
    | cut -d ',' -f 2
openssl pkcs12 -in $radius_ecc_pfx.pfx -clcerts -out  ecc_radius_cert.pem  -nokey
res=“$(ipcalc -c -6 $ipv6_addr 2>/dev/null)"
mysql -uradius —password=“xx” -e “USE radius;”
mysql -uroot —password=‘xxx’ radius < radius_scripts_path/schema.sql 2>/dev/null
ssh -o TCPKeepAlive=yes -o ConnectTimeout=30 -o StrictHostKeyChecking=no \
     -i /root/.ssh/konw id_rsa 192.168.234.2 "vim-cmd vmsvc/power.on vmid”
上一篇下一篇

猜你喜欢

热点阅读