首页 > 代码库 > ssh a host without input the password
ssh a host without input the password
$ vim /home/wangzheng/.ssh/configHost 10.103.xx.xx HostName 10.103.xx.xx
User root
Port 22022
$ ssh 10.103.xx.xx
The authenticity of host ‘[10.103.xx.xx]:22022 ‘ can‘t be established. RSA key fingerprint is xxxxx:7e. Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘[10.103.xx.xx]:22022‘ (RSA) to the list of known hosts. root@10.103.xx.xx‘s password:
$ ssh-copy-id --help
Usage: /usr/bin/ssh-copy-id [-i [identity_file]] [user@]machine
$ ssh-copy-id 10.103.xx.xx
root@10.103.xx.xx‘s password:
Now try logging into the machine, with "ssh ‘10.103.xx.xx‘", and check in: ~/.ssh/authorized_keys to make sure we haven‘t added extra keys that you weren‘t expecting.
$ ssh 10.103.xx.xx
Last login: Mon Jun 16 10:51:35 2014 from 10.10.106.64 tty:[3] jobs:[0] cwd:[~] ip:[10.103.xx.xx]
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。