找不到.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

  • 5
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值