a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 127|回复: 0

[综合辅导] Linux辅导:Linux下不出现提示使用远程拷贝命令SCP

[复制链接]
发表于 2012-8-4 12:07:07 | 显示全部楼层 |阅读模式
把你的本地主机用户的ssh公匙文件写入到远程主机用户的~/.ssh/authorized_keys文件中,具体方法 假设本地主机test1,远程主机test2 一,在test1主机里的用户 运行 ssh-keygen -t rsa 结果如下 Generating public/private rsa key pair. Enter file in which to save the key (/home/.username/ssh/id_rsa):#回车 Enter passphrase (empty for no passphrase):#回车 Enter same passphrase again:#回车 Your identification has been saved in /home/.username /.ssh/id_rsa. Your public key has been saved in /home/.username /.ssh/id_rsa.pub. The key fingerprint is: 38:25:c1:4d:5d:d3:89:bb:46:67:bf:52:af:c3:17:0c username@localhost Generating RSA keys: Key generation complete. 会在用户目录~/.ssh/产生两个文件,id_rsa,id_rsa.pub 二,把id_rsa.pub文件拷贝到test2主机的用户目录下 cat id_rsa.pub ~/.ssh/authorized_keys 就可以了 这样test1主机的用户就可以通过ssh而不用密码登陆test2主机。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-21 12:38 , Processed in 0.163331 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表