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. iOS开发:自定义tableViewCell处理的问题

    还在适配iOS6,索性下一个版本不适配了~~~~~ 问题: *** Assertion failure in -[ PCDiaryDetailReplyCell layoutSublayersOfLa ...

  2. PYTHON线程知识再研习B

    使用threading.Thread模块,也有两种使用方法,可以用类,也可以在实例化对象中传入函数或类实例. #!/usr/bin/env python # -*- coding: utf-8 -*- ...

  3. Unity3D中的工具类

    1.时间:Unity提供了Time类,这个类主要用来获取当前的系统时间. Time.time:从游戏开始后开始计时,表示截止目前共运行的游戏时间. Time.deltaTime:获取Update()方 ...

  4. URAL 1029

    题目大意:M层N列的矩阵(各元素均为正整数),找出一个路径从第一层到达第M层,使得路径上的所有数的和是所有可达路径中最小的,每次上到下一层以后就不能再上去,依次输出路径上的各点在所在层的列数. KB  ...

  5. Computer Graphics Thinking–texture tiling

    Here is one question: how to tile texture? One thing worth to notice: The DirectX and OpenGL stipula ...

  6. MyEclipse第一个Servlet程序 --解决Win7系统下MyEclipse与Tomcat连接问题

    前言 本文旨在帮助学习java web开发的人员,熟悉环境,在Win7系统下运行自己的第一个Servlet程序,因为有时候配置不当或系统原因可能会运行不成功,这给初学者带来了一定烦恼,我也是为此烦恼过 ...

  7. javascript实现的有缩略图功能的幻灯片切换效果

    不久前写了一个简单的图片效果,没想到那么快就要用到项目中,所以功能方面要丰富一下: 主要改进: 1# 用圆点代替之前简单的页数显示,并且点击圆点可以显示对应图片: 2# 点击圆点,显示对应图片的缩略图 ...

  8. js推断元素是否隐藏

    if( document.getElementById("div").css("display")==='none')   if( document.getEl ...

  9. c/c++ 复习基础要点01-const指针、指针函数 函数指针、new/delete与malloc/free区别与联系

    1.      引用本身是有指针实现的:引用为只读指针 例子: int d=123; int& e=d;    //引用 int * const e=d; //只读指针,e指向d,不可修改e指 ...

  10. maven 打包源文件

    1.The source plugin can be used to create a jar file of the project sources from the command line or ...