SUMMARY:
two server : A , B
source server : A
destination server : B
the steps of migrate data from A to B without password.
(1) generate A public key.
(2) copy A's public key to B.
(3) login A remote B without password to copy file. // NOTES : if want to login B to remote A , need to install B's public key to A.

DETAIL:
1、login source server 'A' with root create usergroup and user which user have not password.

//create usergroup
# groupadd goodmood
//create user
# useradd -d /home/goodmooduser -m -g goodmood goodmooduser
//give user and usergroup to directory and recursive.
# chown -R goodmooduser:goodmood /home/goodmooduser

2、login destination server 'B', do same step as step1.

3、login source server 'A', generate public key.

# cd /opt/SSHtectia/util/
# ls
# ./generate_keys goodmooduser
# cd /etc/opt/SSHtectia/keys/goodmooduse
# cat id_rsa_2048_a.pub

4、login destination server 'B', do same step as step3.

5、install the public key of source server 'A' to destination server 'B'

# cd /etc/opt/SSHtectia/keys
# ls
# cd goodmooduser
# vi goodmooduser@A.pub // parse 'A' public key
# vi authorization //add below script to this file.
Key goodmooduser@A.pub
Options command="eval $SSH_ORIGINAL_COMMAND",allow-from="A.nam.nsroot.net"

6、login source server 'A' with root, then execute below steps without password, copy file or directory from source server /Adirectory to destination server /Bdirectory

su - goodmooduser
sftp goodmooduser@B.nam.nsroot.net
put /Adirectory /Bdirectory
exit

Linux - SSH - Password-less login - generate public key - migrate data without password between two VM servers的更多相关文章

  1. Linux SSH登录服务器报ECDSA host key "ip地址" for has changed and you have requested strict checking.错误

    Linux SSH命令用了那么久,第一次遇到这样的错误:ECDSA host key "ip地址" for  has changed and you have requested ...

  2. 生成ssh公有密钥而且注冊到Github Generate ssh rsa keys and register public key on Github

    私有密钥和公有密钥是成对的两个文件,私有文件保存在自己的本机,公有密钥保存到还有一端的server,站点等. github就是一种站点. 仅仅有保存了私有密钥的机器才干訪问远程的server等. 使用 ...

  3. Linux SSH登录服务器报ECDSA host key "ip地址" for has changed and you have requested strict checking错误

    错误:ECDSA host key "ip地址" for  has changed and you have requested strict checking. 解决方案:在终端 ...

  4. Linux使用Public Key方式远程登录

    一.前言: ssh远程登录密码认证的方式有三种,password.Keyboard Interactive.Public Key 前面两种方式就是密码认证,含义都是一样大同小异.第三种是登录方式最安全 ...

  5. linux ssh publickey登录

    一.公钥认证的基本思想: 对信息的加密和解密采用不同的key,这对key分别称作private key和public key,其中,public key存放在目标服务器上,而private key为特 ...

  6. windows,linux,mac生成ssh public key 和 private key

    https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair Creating the key How you create your SSH ...

  7. linux ssh 使用深度解析(key登录详解)

    SSH全称Secure SHell,顾名思义就是非常安全的shell的意思,SSH协议是IETF(Internet Engineering Task Force)的Network Working Gr ...

  8. linux ssh使用深度解析(key登录详解)

    linux ssh使用深度解析(key登录详解) SSH全称Secure SHell,顾名思义就是非常安全的shell的意思,SSH协议是IETF(Internet Engineering Task ...

  9. Linux SSH: key, agent, keychain

    以前遇到过一个问题,在用有些 Linux 发行版时,用 ssh-keygen 产生好了密钥对并上传到了目标服务器,但每次登录都要重新输入. 这与 ssh-agent 有关,看如下 man ssh-ag ...

随机推荐

  1. android特效

    http://houxiyang.com/archives/89/ http://blog.csdn.net/hjj0212/article/details/8535817 http://www.li ...

  2. Zookeeper,也要接触起来啦

    分布式的东东,就是部署也方便,但管理,想法,大集群应用是要点...! 参考如下URL简单实现 ,以后应用时多留意. http://blog.csdn.net/shirdrn/article/detai ...

  3. 这样就算会了PHP么?-3

    关于循环,IF,WHILE.... <?php $month = date("n"); $today = date("j"); if ($today &g ...

  4. windows设备驱动安装指南

    高观点下的设备驱动安装(overview) 一.windows是怎样安装设备的? 第一步:新设备的识别 在给一个新设备安装驱动之前,总线或集线器(hub)驱动会为连接到PC上的设备分配一个硬件ID(h ...

  5. bzoj1786

    题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1786 刚看上去觉得挺吓人的...... 冥冥之中我的内心深处告诉我填进去的数一定是非严格递增的 ...

  6. QA笑话----杂思

    QA工程师走进酒吧,要了一杯啤酒,要了0杯啤酒,要了999999999杯啤酒,要了一只蜥蜴,要了-1杯啤酒,要了一个sfdeljknesv,酒保从容应对,QA工程师 很满意.接下来,一名顾客来到了同一 ...

  7. 在 Ubuntu 12.04 上安装 GitLab6.0

    安装环境: 操作系统:    Ubuntu 12.4 LTS 英文 数据库:        mysql5.5.32 web服务器: nginx1.4.1 首先, 添加git和nginx的ppa,并升级 ...

  8. qt tablewidget中单个和批量删除代码如下(部分)截图如下

    def coltable(self):#行删除    row=self.downwidget.currentRow()    select=self.downwidget.isItemSelected ...

  9. python高级编程:有用的设计模式1

    # -*- coding: utf-8 -*-__author__ = 'Administrator'#python高级编程:有用的设计模式#设计械是可复用的,某种程序上它对软件设计中觉问题提供的语言 ...

  10. inline-block及解决空白间距

    參考:http://www.jb51.net/css/76707.html http://www.webhek.com/remove-whitespace-inline-block/ inline-b ...