mac ssh key 的获取

来源:互联网 发布:怎样添加网络打印机 编辑:程序博客网 时间:2024/06/05 15:28

mac 系统开始就已经为我们安装了ssh  如果没有安装没,首先安装;这个在网上到处都是。

打开终端:$ ssh -v

查看ssh版本

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011

usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]

           [-D [bind_address:]port] [-e escape_char] [-F configfile]

           [-I pkcs11] [-i identity_file]

           [-L [bind_address:]port:host:hostport]

           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]

           [-R [bind_address:]port:host:hostport] [-S ctl_path]

           [-W host:port] [-w local_tun[:remote_tun]]

           [user@]hostname [command]

这个表明ssh已经安装,

打开终端,$ ssh-keygen 一路enter下。

生成  在当前用户名下 会有一个.sh文件。

查看 .ssh

$ ls -a ~/.ssh  通过搜索目录

id_rsaid_rsa.pub

打开  id_rsa.pub文件 里面就有需要的ssh key。

0 0
原创粉丝点击