WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Install and run SSH in dCore?  (Read 1788 times)

Offline donquixote2u

  • WikiUser
  • *
  • Posts: 19
Re: Install and run SSH in dCore?
« Reply #15 on: August 03, 2016, 02:07:34 PM »
update - can't seem to get the filetool.lst to work, but backing up those files + the ssh keys on to /opt and copying them back again in /opt/bootlocal.sh before starting the ssh server works.

so files are: /etc/passwd /etc/shadow, and the whole /etc/ssh directory


Offline Greg Erskine

  • Full Member
  • ***
  • Posts: 194
Re: Install and run SSH in dCore?
« Reply #16 on: August 03, 2016, 04:37:14 PM »
Hi donquixote2u,

The file is /opt/.filetool.lst

The file should look a bit like this, note the absence of leading slashes.

Code: [Select]
tc@piCore:/opt$ cat .filetool.lst
opt
home
etc/passwd
etc/shadow
etc/group
etc/gshadow
etc/motd
etc/modprobe.conf
etc/asound.conf
usr/local/etc/pointercal
usr/local/etc/ssh/ssh_host_dsa_key
usr/local/etc/ssh/ssh_host_dsa_key.pub
usr/local/etc/ssh/ssh_host_ecdsa_key
usr/local/etc/ssh/ssh_host_ecdsa_key.pub
usr/local/etc/ssh/ssh_host_ed25519_key
usr/local/etc/ssh/ssh_host_ed25519_key.pub
usr/local/etc/ssh/ssh_host_rsa_key
usr/local/etc/ssh/ssh_host_rsa_key.pub
usr/local/etc/init.d/squeezelite
usr/local/etc/init.d/httpd
usr/local/etc/init.d/shairport-sync
usr/local/sbin/config.cfg
usr/local/sbin/piversion.cfg
usr/local/sbin/setup
usr/local/sbin/pcp
usr/local/sbin/pcp-load
var/lib/alsa/asound.state
var/spool/cron/crontabs
usr/local/etc/lirc/lircd.conf
home/tc/.lircrc

I use piCore, but I think it applies to all versions.

regards
Greg

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9278
Re: Install and run SSH in dCore?
« Reply #17 on: July 23, 2017, 06:42:41 AM »
I have changed the openssh-server startup script to not run "ssh-keygen -A" upon extension loading, and this is also how the startup of openssh.tcz in the regular Tinycore repo behaves upon looking at its startup script. 

Before starting the SSH server, run as root "ssh-keygen -A" and then back up the /etc/ssh directory to save the generated key files.  Or use the specific commands to generate the desired keys:

ssh-keygen -A   (will create dsa, ecdsa, rsa, and ed25519 keys)
ssh-keygen -t dsa
ssh-keygen -t ecdsa
ssh-keygen -t ed25519
ssh-keygen -t rsa
ssh-keygen -t rsa1

Other files to back up such as to keep the same user and password are mentioned in other posts in this thread. 

The ssh server is started with the below command -

/etc/init.d/ssh start