No such file or directory
程序员文章站
2022-03-08 19:26:45
...
ssh-****** -t ed25519 -C "[email protected]"
Generating public/private ed25519 key pair.
Enter file in which to save the key (/Users/fyhsurvivors/.ssh/id_ed25519):
/Users/fyhsurvivors/.ssh/id_ed25519 already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/fyhsurvivors/.ssh/id_ed25519.
Your public key has been saved in /Users/fyhsurvivors/.ssh/id_ed25519.pub.
The key fingerprint is:
SHA256:eVTC9BP7dZ4mQVyJiIrWD2xhTDzorgsZI78zTJ+zB6k [email protected]
The key's randomart image is:
+--[ED25519 256]--+
| x. xx x.x..|
| . * .x.x +. |
| . x . xxx. o|
| x * x .xxx|
|.x ..x x . ..o.|
|.x. .x x x |
| .xx.x |
| xx .x |
| x.x. |
+----[SHA256]-----+
[email protected] ~ % cat id_rsa.pub
cat: id_rsa.pub: No such file or directory
[email protected] ~ % cd ~/.ssh
[email protected] .ssh % ls
config id_ed25519.pub id_rsa.pub
id_ed25519 id_rsa known_hosts
[email protected] .ssh % cat id_rsa.pub
ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxx= [email protected]
[email protected] .ssh %
首先,全部操作如上,在生成 生成新的 SSH ** 后复制其公钥的时候执行 cat id_rsa.pub 抛出了 No such file or directory
其次,重新 cd 到 ssh 层级后尝试获取
cd ~/.ssh
ls
最后,成功获取到其 list 后复制其需要的 id_rsa.pub 即可.
注:需要将其 copy 至类似记事本的文本框中后再次复制至 ssh 配置处,不然可能会出现格式异常的情况.
以上便是此次分享的全部内容,希望能对大家有所帮助!
上一篇: linux内核编译 fatal error: openssl/opensslv.h: No such file or directory
下一篇: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory问题解决方法
推荐阅读
-
php中file_get_content 和curl以及fopen 效率分析
-
为PHP安装imagick时出现Cannot locate header file MagickWand.h错误的解决方法
-
C#中使用Path、Directory、Split、Substring实现对文件路径和文件名的常用操作实例
-
Linux中复制目录报错cp:omitting directory的解决办法
-
python升级带来的yum异常(解决错误File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:)
-
电脑打印提示Active Directory域服务当前不可用解决办法
-
Android数据持久化之File机制分析
-
详解no input file specified 三种解决方法
-
浅谈Android Studio 3.0 工具新特性的使用 Android Profiler 、Device File Explorer
-
Python File(文件) 方法整理