Thursday, March 1, 2012

Install OpenSSH Server on Tiny Core

The following assumes that persistent opt is used: http://wiki.tinycorelinux.net/wiki:persistent_home

1) First install the OpenSSH extension.

# tce-load -iw openssh.tcz



This will download the OpenSSH extension and have it set to be loaded into memory during boot process. To verify that it will be loaded upon boot verify that "openssh.tcz" is in the onboot.lst file located in /etc/sysconfig/tcedir/onboot.lst.

2) Basic Configuration

# sudo cp /usr/local/etc/ssh/sshd_config.example /usr/local/etc/ssh/sshd_config


3) Start OpenSSH deamon


# sudo /usr/local/etc/init.d/openssh start


4) Set configurations to be persistent

Add the following to /opt/.filetool.lst

/usr/local/etc/ssh
/etc/passwd
/etc/shadow


5) Set password to tc user

Use the passwd to set password for tc user to allow for remote login.

6) Set OpenSSH deamon to start at boot

Add the following to /opt/bootlocal.sh

/usr/local/etc/init.d/openssh start


7) Insure files are backed up


# filetool.sh -b


This will backup files to the /etc/sysconfig/tcedir/mydata.tcz. A poweroff or reboot will not run this. Since I use Micro Core I have run this to backup the files since exittc only works while running X Windows.