问题遇到的现象和发生背景
百度云服务器
无法创建authorized_keys文件
问题相关代码,请勿粘贴截图
[root@slave01 .ssh]# pwd
/root/.ssh
[root@slave01 .ssh]# touch authorized_keys
touch: cannot touch ‘authorized_keys’: No such file or directory
[root@slave01 .ssh]#
运行结果及报错内容
touch: cannot touch ‘authorized_keys’: No such file or directory
我的解答思路和尝试过的方法
切换路径仍然没法创建authorized_keys,但是不报错。vi,vim也都试过不行,并且报错E303: Unable to open swap file for "authorized_keys", recovery impossible.
磁盘信息如下
[root@slave01 .ssh]# fdisk -l
Disk /dev/vda: 42.9 GB, 42949672960 bytes, 83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000cfa80
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 83886046 41941999+ 83 Linux
[root@slave01 .ssh]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.9G 0 7.9G 0% /dev
tmpfs 7.9G 0 7.9G 0% /dev/shm
tmpfs 7.9G 17M 7.9G 1% /run
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
/dev/vda1 40G 12G 27G 30% /
cm_processes 7.9G 0 7.9G 0% /run/cloudera-scm-agent/process
tmpfs 1.6G 0 1.6G 0% /run/user/0
[root@slave01 .ssh]#
我想要达到的结果
可以创建authorized_keys