T086ѧϰ�� | վ��ѧԺ | �����ĵ� | ���� | Ъ���� | IP��ַ��ѯ | �������� | ���ջ��� | �����ֵ� | ���ù��� | ������Ϣ��ѯ

ͨ����Կʵ��scp���������봫���ļ�

�� ����ʱ�䣺2011-01-02 | ���壺�� �� С��
[����]�����ڲ�ͬlinux����֮�以��scp���ļ���ÿ������Ҫ���������ſ��С� ͨ��ssh-keygen���ɹ�Կ������̨����֮�以�ཨ������ͨ�����ɡ� ���豾�ػ���client��Զ�̻���Ϊserver�� 1. ����rsa keygen [winter@client wi...

 

�����ڲ�ͬlinux����֮�以��scp���ļ���ÿ������Ҫ���������ſ��С�

 
ͨ��ssh-keygen���ɹ�Կ������̨����֮�以�ཨ������ͨ�����ɡ�

 
���豾�ػ���client��Զ�̻���Ϊserver��

 
1. ����rsa keygen

 
[winter@client winter] $ ssh-keygen -b 1024 -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/winter/.ssh/id_rsa): <Enter>
Enter passphrase (empty for no passphrase): <Enter>
Enter same passphrase again: <Enter>
Your identification has been saved in /home/winter/.ssh/id_rsa.
Your public key has been saved in /home/winter/.ssh/id_rsa.pub.
The key fingerprint is:
33:d4:7b:9c:87:04:cf:14:40:22:6d:c7:15:78:97:6a winter@client

 
ֱ�����湫Կ��˽Կ���ŵ�ַ����ֱ�ӻس���˽Կ��������ֱ�ӻس���Ҳ�������롣

 
2. �鿴.sshĿ¼���˶�˽Կ�͹�Կ�ļ�

 
[winter@client winter] $ ls .ssh/
id_rsa  id_rsa.pub  known_hosts

 
3. ������Կ��Ŀ�������ϣ���������authorized_keys

 
[winter@client winter] $ scp .ssh/id_rsa.pub [email protected]:/home/winter/.ssh/authorized_keys
The authenticity of host '192.168.0.110(192.168.0.110)' can't be established.
RSA key fingerprint is 5b:78:e8:e9:dc:d8:db:bd:f7:66:44:e6:3b:ce:f2:79.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.110' (RSA) to the list of known hosts.
[email protected]'s password: <Enter>
id_rsa.pub                                                                     100%  221     1.2MB/s   00:00
�״�scp����ʱ�����ǻ���ʾ�������룬�����Ƿ��������ӵ���ʾ���Ժ�
4. ����ssh����
[winter@client winter] $ ssh 192.168.0.110
5. ok���㶨��
 
[winter@server winter] # it's ok!

ԭ�ģ�http://hi.baidu.com/smallfish_xy/blog/item/5b283b8a9075ccd9fc1f102d.html

  • ת����ע����Դ��ITѧϰ�� ��ַ��http://www.t086.com/ �����������Ƽ�������
  • �ر������� ��վ�������ر�������ֹת�ص�ר�������������¿�������ת�أ���������ע��������ԭʼ���ߡ����°�Ȩ������ԭʼ�������С����ڱ���վת�����µĸ��˺���վ�����DZ�ʾ������л�⡣������վת�ص������а�Ȩ��������ϵ���ǣ����ǻᾡ�����Ը�����
������ѯ Health Check Gulangyu
© 2017 T086ѧϰ�� - T086.com(ԭitlearner.com)
RunTime:12.71ms QueryTime:7