ubuntu 建立新用户并发送公钥

create User

  1. sudo useradd -m -s /bin/bash -G sudo xxx
  2. sudo passwd xxx
-s select the exactly bash
-G select the attached group .
In generally, we only select the sudo

send the key

  1. if you did not have the rsa key. then create one by
    ssh-keygen
  2. send it to the remote server by
    ssh-copy-id -p port user@remote ip

For Convenient link

  1. enter the directory of .ssh
    cd .ssh
  2. make file of conig
    touch config
  3. write the message of your remote computer
- vim config
- i
-
Host hostname for your any name you like 
        HostName remote_ip
        User username
        Port port
Example:
Host ahhhha
        HostName 183.183.183.183
        User aaa
        Port 22
- :wq
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 近期在linux上搭建了用于分布式存储的----GlusterFS和Ceph这两个开源的分布式文件系统。 前言--...
    ZNB_天玄阅读 7,792评论 0 0
  • 加密算法 对称加密算法 加密和解密使用同一个密钥 DES、3DES、AES、Blowfish、Twofish、ID...
    毛利卷卷发阅读 5,550评论 0 4
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,150评论 0 10
  • 昨晚宇彤老师表扬我了,不管成年人还是孩子都喜欢被表扬的感觉,那就更有劲和信心向声音万人迷努力,远处的景像更了一步!...
    小芫阅读 845评论 0 0
  • 青春是一首歌,哼着唱着就已经成为了回忆。回忆里有些人注定不会再遇见,那些稚嫩的声音也将不在耳旁萦绕。留下的只有一张...
    三王先生阅读 3,582评论 0 0