免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 8138 | 回复: 4
打印 上一主题 下一主题

How to transfer files between two linux boxs without pwd [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-09-24 00:50 |只看该作者 |倒序浏览
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

论坛徽章:
0
2 [报告]
发表于 2005-03-17 22:55 |只看该作者

How to transfer files between two linux boxs without pwd

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

论坛徽章:
0
3 [报告]
发表于 2005-03-17 23:03 |只看该作者

How to transfer files between two linux boxs without pwd

呵呵,不错。
不过,没有必要写两次。

论坛徽章:
0
4 [报告]
发表于 2005-03-17 23:10 |只看该作者

How to transfer files between two linux boxs without pwd

班竹你好好验证一下,第二种才对,第一种不正确。我刚刚才验证的。以上不是重复发帖。

论坛徽章:
0
5 [报告]
发表于 2005-03-17 23:28 |只看该作者

How to transfer files between two linux boxs without pwd

哦,是个方向的问题。

呵呵,的确没有仔细看。diff 了一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP