• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

How to transfer files between two linux boxs without pwd

发布: 2007-7-04 12:06 | 作者: admin | 来源:  网友评论 | 查看: 9次 | 进入软件测试论坛讨论

领测软件测试网
Let me guess you have two linux boxs ( linux1 and linux2). You want to copy files from linux1 to linux2 without password or do it at crontab.
      1. Install SSH
      2. Create two users. user1 at liunx1 and user2 at linux2.
      3. On linux2, login as user2. do
      ssh-keygen -P "" -trsa1 -f ~/.ssh/identity
       4. Copy key file to linux1
       scp /home/user2/.ssh/identity.pub user1@linux1:/home/user1/.ssh/authorized_keys
        5. Change file permission
          chmod 600 /home/user2/.ssh/authorized_keys
        6. change ssh config file: /etc/ssh/ssh_config
      Ad
Host *
        ForwardX11 yes
        IdentityFile ~/.ssh/identity
        Protocol 1
        7.  Restart sshd
        8. login to linux1 as user1.
        9.Change file permission
          chmod 600 /home/user1/.ssh/identity
        10. Restart sshd
     Now, you can ssh or secure copy filles by using user1 from linux1 to linux2 without prompt

 hhzhaokun 回复于:2005-03-17 22:55:51
Let me guess you have two linux boxs ( linux1 and linux2). You want to copy files from linux1 to linux2 without password or do it at crontab. 
1. Install SSH 
2. Create two users. user1 at liunx1 and user2 at linux2. 
3. On linux1, login as user1. do 
ssh-keygen -P "" -trsa1 -f ~/.ssh/identity 
4. Copy key file to linux2 
scp /home/user1/.ssh/identity.pub user2@linux2:/home/user2/.ssh/authorized_keys 
5. Change file permission 
chmod 600 /home/user1/.ssh/identity.pub
6. change ssh config file: /etc/ssh/ssh_config 
Ad 
Host * 
ForwardX11 yes 
IdentityFile ~/.ssh/identity 
Protocol 1 
7. Restart sshd 
8. login to linux2 as user2. 
9.Change file permission 
chmod 600 /home/user2/.ssh/authorized_keys
10. Restart sshd 
Now, you can ssh or secure copy filles by using user1 from linux1 to linux2 without prompt

 零二年的夏天 回复于:2005-03-17 23:03:25
呵呵,不错。
不过,没有必要写两次。;)

 hhzhaokun 回复于:2005-03-17 23:10:12
班竹你好好验证一下,第二种才对,第一种不正确。我刚刚才验证的。以上不是重复发帖。

 零二年的夏天 回复于:2005-03-17 23:28:11
哦,是个方向的问题。

呵呵,的确没有仔细看。diff 了一下:D

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网