April last year, I had experience to configure ssh server (sshd) in Tiny Core Linux and had documented it here.
https://firewallengineer.wordpress.com/2012/04/01/how-to-install-and-configure-openssh-ssh-server-in-tiny-core-linux/
All these were running on live cd.
When I installed TC in hard disk (VDI), I’ve noticed that /usr/local/etc/ssh/sshd_config will be gone every time I reboot my VB guest. Is there any way to make it permanent?
Table below shows a few differences of ssh setting in TC before and after ssh server configuration.
After reboot, the entire configuration made on the right side will be gone.
BEFORE |
AFTER |
root@box:~# netstat -an | grep :22
netstat: /proc/net/tcp6: No such file or directory
netstat: /proc/net/udp6: No such file or directory
netstat: /proc/net/raw6: No such file or directory
root@box:~# |
root@box:~# netstat -an | grep :22
netstat: /proc/net/tcp6: No such file or directory
netstat: /proc/net/udp6: No such file or directory
netstat: /proc/net/raw6: No such file or directory
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 192.168.10.101:22 192.168.10.1:5250 ESTABLISHED
root@box:~# |
root@box:~# ps | grep ssh
888 root grep ssh
root@box:~# |
root@box:~# ps | grep ssh
839 root /usr/local/sbin/sshd
848 root sshd: tc [priv]
854 tc {sshd} sshd: tc@pts/0
888 root grep ssh
root@box:~# |
root@box:~# ls -l /usr/local/etc/
total 0
drwxr-xr-x 2 root root 60 May 23 2012 init.d
drwxr-xr-x 2 root root 240 Jul 31 23:37 ssh
drwxr-xr-x 7 root root 240 Jul 31 23:20 ssl
root@box:~# |
root@box:~# ls -l /usr/local/etc/
total 0
drwxr-xr-x 2 root root 60 May 23 2012 init.d
drwxr-xr-x 2 root root 240 Jul 31 23:37 ssh
drwxr-xr-x 7 root root 240 Jul 31 23:20 ssl
root@box:~# |
root@box:~# ls -l /usr/local/etc/init.d/
total 0
lrwxrwxrwx 1 root root 48 Jul 31 23:20 openssh -> /tmp/tcloop/openssh/usr/local/etc/init.d/openssh
root@box:~# |
root@box:~# ls -l /usr/local/etc/init.d/
total 0
lrwxrwxrwx 1 root root 48 Jul 31 23:20 openssh -> /tmp/tcloop/openssh/usr/local/etc/init.d/openssh
root@box:~# |
root@box:~# ls -l /usr/local/etc/ssh/
total 28
lrwxrwxrwx 1 root root 44 Jul 31 23:20 moduli -> /tmp/tcloop/openssh/usr/local/etc/ssh/moduli
lrwxrwxrwx 1 root root 56 Jul 31 23:20 ssh_config.example -> /tmp/tcloop/openssh/usr/local/etc/ssh/ssh_config.example
lrwxrwxrwx 1 root root 57 Jul 31 23:20 sshd_config.example -> /tmp/tcloop/openssh/usr/local/etc/ssh/sshd_config.example
root@box:~# |
root@box:~# ls -l /usr/local/etc/ssh/
total 28
lrwxrwxrwx 1 root root 44 Jul 31 23:20 moduli -> /tmp/tcloop/openssh/usr/local/etc/ssh/moduli
lrwxrwxrwx 1 root root 56 Jul 31 23:20 ssh_config.example -> /tmp/tcloop/openssh/usr/local/etc/ssh/ssh_config.example
-rw——- 1 root root 668 Jul 31 23:37 ssh_host_dsa_key
-rw-r–r– 1 root root 598 Jul 31 23:37 ssh_host_dsa_key.pub
-rw——- 1 root root 227 Jul 31 23:37 ssh_host_ecdsa_key
-rw-r–r– 1 root root 170 Jul 31 23:37 ssh_host_ecdsa_key.pub
-rw——- 1 root root 1675 Jul 31 23:37 ssh_host_rsa_key
-rw-r–r– 1 root root 390 Jul 31 23:37 ssh_host_rsa_key.pub
-rw-r–r– 1 root root 3715 Jul 31 23:35 sshd_config
lrwxrwxrwx 1 root root 57 Jul 31 23:20 sshd_config.example -> /tmp/tcloop/openssh/usr/local/etc/ssh/sshd_config.example
root@box:~# |