安装了openssh,每次重启虚拟机后,配置文件就丢失了,是不是因为/目录没有挂载到磁盘的原因? 启动是在/usr/local/etc/init.d/openssh ,配置文件是在/usr/local/etc/ssh/sshd_config
由 news 在 2022-03-27 07:44 发布 2698 次点击
目前挂载的情况是:
Filesystem Size Used Available Use% Mounted on
rootfs 219.0M 18.5M 200.5M 8% /
tmpfs 121.7M 0 121.7M 0% /dev/shm
/dev/sda1 498.5M 23.8M 464.2M 5% /mnt/sda1
/dev/loop0 128.0K 128.0K 0 100% /tmp/tcloop/aterm
/dev/loop1 28.0K 28.0K 0 100% /tmp/tcloop/bzip2-lib
/dev/loop2 496.0K 496.0K 0 100% /tmp/tcloop/fltk-1.3
/dev/loop3 28.0K 28.0K 0 100% /tmp/tcloop/flwm
/dev/loop4 304.0K 304.0K 0 100% /tmp/tcloop/freetype
/dev/loop5 36.0K 36.0K 0 100% /tmp/tcloop/imlib2-bin
/dev/loop6 184.0K 184.0K 0 100% /tmp/tcloop/imlib2
/dev/loop7 12.0K 12.0K 0 100% /tmp/tcloop/libfontenc
/dev/loop8 36.0K 36.0K 0 100% /tmp/tcloop/libICE
/dev/loop9 116.0K 116.0K 0 100% /tmp/tcloop/libjpeg-turbo
/dev/loop10 100.0K 100.0K 0 100% /tmp/tcloop/libpng
/dev/loop11 12.0K 12.0K 0 100% /tmp/tcloop/libSM
/dev/loop12 928.0K 928.0K 0 100% /tmp/tcloop/libX11
/dev/loop13 4.0K 4.0K 0 100% /tmp/tcloop/libXau
/dev/loop14 328.0K 328.0K 0 100% /tmp/tcloop/libxcb
/dev/loop15 8.0K 8.0K 0 100% /tmp/tcloop/libXdmcp
/dev/loop16 24.0K 24.0K 0 100% /tmp/tcloop/libXext
/dev/loop17 104.0K 104.0K 0 100% /tmp/tcloop/libXfont
/dev/loop18 44.0K 44.0K 0 100% /tmp/tcloop/libXmu
/dev/loop19 160.0K 160.0K 0 100% /tmp/tcloop/libXt
/dev/loop20 36.0K 36.0K 0 100% /tmp/tcloop/wbar
/dev/loop21 1.1M 1.1M 0 100% /tmp/tcloop/Xlibs
/dev/loop22 128.0K 128.0K 0 100% /tmp/tcloop/Xprogs
/dev/loop23 352.0K 352.0K 0 100% /tmp/tcloop/Xvesa
/dev/loop24 1.8M 1.8M 0 100% /tmp/tcloop/openssl-1.1.1
/dev/loop25 1.3M 1.3M 0 100% /tmp/tcloop/openssh
配置文件
lrwxrwxrwx 1 root root 44 Mar 27 06:28 moduli -> /tmp/tcloop/openssh/usr/local/etc/ssh/moduli
lrwxrwxrwx 1 root root 53 Mar 27 06:28 ssh_config.orig -> /tmp/tcloop/openssh/usr/local/etc/ssh/ssh_config.orig
-rw------- 1 root root 1.3K Mar 27 06:41 ssh_host_dsa_key
-rw-r--r-- 1 root root 598 Mar 27 06:41 ssh_host_dsa_key.pub
-rw------- 1 root root 492 Mar 27 06:41 ssh_host_ecdsa_key
-rw-r--r-- 1 root root 170 Mar 27 06:41 ssh_host_ecdsa_key.pub
-rw------- 1 root root 399 Mar 27 06:41 ssh_host_ed25519_key
-rw-r--r-- 1 root root 90 Mar 27 06:41 ssh_host_ed25519_key.pub
-rw------- 1 root root 2.5K Mar 27 06:41 ssh_host_rsa_key
-rw-r--r-- 1 root root 562 Mar 27 06:41 ssh_host_rsa_key.pub
-rw-r--r-- 1 root root 3.0K Mar 27 06:40 sshd_config
lrwxrwxrwx 1 root root 54 Mar 27 06:28 sshd_config.orig -> /tmp/tcloop/openssh/usr/local/etc/ssh/sshd_config.orig