本地免密ssh登录
【本机】
➜ ~ sudo vim /etc/hosts
119.45.121.102 node2
➜ ~ ssh-keygen -t rsa
➜ ~ ls -alhi .ssh/*
➜ ~ cat .ssh/id_rsa.pub
【远程】
[root@node2 ~]# vim .ssh/authorized_keys
追加公钥
【本地】
➜ ~ ssh root@node2
远程服务器使用本地代理FQ
【远端】
vim /etc/ssh/sshd_config
# GatewayPorts yes
service sshd reload
【本地】
➜ ~ ssh -Nf -R 33333:127.0.0.1:22 root@119.*.*.*
root@119.*.*.*'s password:
【远端】
[root@node2 ~]# netstat -antp | grep 33333
tcp 0 0 0.0.0.0:33333 0.0.0.0:* LISTEN 954134/sshd: root
tcp6 0 0 :::33333 :::* LISTEN 954134/sshd: root
export http_proxy=127.0.0.1:33333
#export ftp_proxy=192.168.13.226:10086
#export https_proxy=192.168.13.226:10086
[root@node2 ~]# export http_proxy=127.0.0.1:33333
[root@node2 ~]# echo $http_proxy
127.0.0.1:33333
[root@node2 ~]# git clone https://github.com/kubernetes/kops.git -v