[root@test ~]# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 79:a9:66:cd:1a:a5:7c:82:80:c3:06:ec:44:13:b9:7a root@test The key's randomart image is: +--[ RSA 2048]----+ | +o | |o.. | |.o. | |o+ . . . | |..= . S + | |..E. . o B | | . . O + | | o = | | . | +-----------------+
[root@test ~]# ls .ssh/ authorized_keys id_rsa id_rsa.pub [root@test ~]# [root@test ~]# ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.0.178 The authenticity of host '192.168.0.178 (192.168.0.178)' can't be established. RSA key fingerprint is 53:bd:d7:e6:27:96:f3:70:f1:4b:4d:35:a4:38:1d:69. Are you sure you want to continue connecting (yes/no)? YES Warning: Permanently added '192.168.0.178' (RSA) to the list of known hosts. root@192.168.0.178's password: Now try logging into the machine, with "ssh 'root@192.168.0.178'", and check in: .ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting. [root@test ~]#
[root@test ~]# ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:7e:1f:f6 brd ff:ff:ff:ff:ff:ff inet 192.168.0.177/24 brd 192.168.0.255 scope global eth0 inet6 fe80::20c:29ff:fe7e:1ff6/64 scope link valid_lft forever preferred_lft forever [root@test ~]# [root@test ~]# ssh 192.168.0.178 Last login: Sat Sep 24 14:00:49 2016 from 192.168.0.103 [root@test ~]#ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:36:93:06 brd ff:ff:ff:ff:ff:ff inet 192.168.0.178/24 brd 192.168.0.255 scope global eth0 inet6 fe80::20c:29ff:fe36:9306/64 scope link valid_lft forever preferred_lft forever
[root@test .ssh]# cat authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA+I6LXDE5DvSmQJcX98FpzScXoGpJ6fD47yXzp/tp/HTpOTQgNbiTjH6s6yNMsd5LQlBED8a5CTx5wKm+H7rT0po2xD+AZcF69js+4SwO8/xFwHLZ/8O64hsvn68GmxqO9vP8giWWcZNy/CsmOecllOB1NFXpCwQ1TBw+P4n84oj2YHwdSzGcre8j/OiAChHl6QHFtAuFvOdVRYFeyurFM8KP6Bb6tEeDDrqILboaQtTJOwRD2Fkt33C5lpuZNNGqc+DmRjDabgC3ZgzRCe3OyYbhaRlfiwVHFPYt7pDQMnrp/dUmyBSs/6gwd2CiK3cV4ZvpOzyGdynPqXsxIIBIKw== root@test
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有