简体   繁体   English

删除root / .ssh /中的.ssh目录

[英]delete .ssh directory in root/.ssh/

I try to practice to use ssh keygen to generate public key and private key 我尝试练习使用ssh keygen生成公用密钥和专用密钥

And then I type cd .ssh 然后我输入cd .ssh

And it said there is no directory. 它说没有目录。

Then I found that I do it wrong. 然后我发现我做错了。 I use superuser to generate the key so it create the directory '/root/.ssh/' 我使用超级用户生成密钥,因此它创建目录“ /root/.ssh/”

Please help me to delete the .ssh directory in the root Thank you. 请帮助我删除根目录下的.ssh目录谢谢。

You need to log in as the superuser and delete the folder, or just use the sudo command. 您需要以超级用户身份登录并删除文件夹,或者仅使用sudo命令。

sudo su
rm -rf /root/.ssh

or 要么

sudo rm -rf /root/.ssh

Unless you cannot log into your superaccount, then thats a different story. 除非您无法登录自己的超级帐户,否则那就是另一回事了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM