????SSH????????????Config????SSH??
???????????? ???????[ 2017/2/15 11:13:24 ] ?????????????????? ???ù???
??????????? SSH ??????????????????????????????????
????$ ssh user@hostname -p port
?????????ж?? SSH ??????????????SSH?????????? SSH ??????????????????£??????????????????
???????? SSH ??????????????????????????????????? SSH ????????????config???? SSH ????
???????SSH???????
????SSH ?????????????????????ò?????
?????????????
?????????????? (~/.ssh/config)
????????????? (/etc/ssh/ssh_config)
?????????????????????????Σ???????????????”Host”???????????????????????????????host??????????????Ρ?
??????????????
????????????Щ?????SSH??????
????· Host ????
????· HostName ??????
????· Port ???
????· User ?????
????· IdentityFile ????????·??
????· IdentitiesOnly ?????SSH key ???
????· PreferredAuthentications ??????Public Key???
????Host
????Host????????????????????Ρ?
????SSH???????????????????????
????'*' ???? 0??n ???????????
????'?' ????????????????
????'!' ??????????
???????????????????????п????????????? host ????????????Σ?
????$ cat /etc/ssh/ssh_config | grep '^Host'
????Host *
???????????Щ?????????????????????????????и?????Щ??????á?
????GlobalKnownHostsFile
???????????????????????????????????????????????????????????????????????????????????????? /etc/ssh/ssh_known_hosts ?? /etc/ssh/ssh_known_hosts2 .
????HostName
????????????????????????????????IP???????????????а??? ‘%h’ ????????????????????е????????滻??
????IdentityFile
??????????????????????·???????? ~/.ssh/id_dsa ?? ~/.ssh/id_ecdsa ?? ~/.ssh/id_ed25519 ?? ~/.ssh/id_rsa ?е?????????????????????????????
????'%d' ?????????
????'%u' ???????????
????'%l' ??????????
????'%h' ?????????
????'%r' ????????
?????????????????????????????????л????γ?????Щ????????
????Port
???????????????????????22??
????User
?????????????????
????UserKnownHostsFile
???????????????????????????????????????????????????????????????????????????????????????? ~/.ssh/known_hosts ?? ~/.ssh/known_hosts2 .
????StrictHostKeyChecking
????SSH??????StrictHostKeyChecking??????? StrictHostKeyChecking=no ??????????????????????????????????μ????????????κξ?????????
???????и??????????????????? man ssh_config ????????
??????????
???????????????????www.hi-linux.com?????????
????Host www
????HostName www.hi-linux.com
????Port 22
????User root
????IdentityFile ~/.ssh/id_rsa
????IdentitiesOnly yes
????$ ssh www
?????????????????????е????
????Host github.com git.coding.net
????HostName %h
????Port 22
????User git
????IdentityFile ~/.ssh/id_rsa_blog
????IdentitiesOnly yes
????$ ssh -T git@git.coding.net
????$ ssh -T git@github.com
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11