找不到.ssh文件夹的解决

用ssh登录后居然找不到.ssh文件夹

我用ssh登录主机,然后退出,重新登录,还是找不到.ssh
只好上网查,有个方法,输入命令 ssh localhost,试了一下好用。就是说,必须要ssh命令登录一下才能建立.ssh文件夹,但我用putty登录不算吗?

root@P1120:/# cd ~
root@P1120:~# cd .ssh
-bash: cd: .ssh: No such file or directory
root@P1120:~# ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is SHA256:rUw3ZClhqOcaAT6wJJ6Av+mhV/f0hf5GEoh2mlM1j2Q.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': y
Please type 'yes' or 'no': yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
root@localhost's password:
Linux P1120 4.9.0-12-686 #1 SMP Debian 4.9.210-1 (2020-01-20) i586

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Mar 21 09:38:04 2020 from 192.168.0.163
root@P1120:~# cd .ssh
root@P1120:~/.ssh# ls
known_hosts

发布了10 篇原创文章 · 获赞 0 · 访问量 136

猜你喜欢

转载自blog.csdn.net/misisippi68/article/details/105004878