tinycore – install openssh, password less login and persistent config

gw@laptop – create ssh key client

## create ssh key
mkdir -p ~/.ssh && cd ~/.ssh
ssh-keygen -t rsa
cp id_rsa.pub authorized_keys

## get ip laptop
sudo ifconfig

## start simple http server, so tc can wget the authorized_keys file
python -m SimpleHTTPServer 

tc@box – install openssh and download authorized_keys file

prefare folder and get keys
mkdir -p ~/.ssh && cd ~/.ssh

## download file 
wget http://gw.lap.top.ip:8000/authorized_keys

## install openssh
tc-load -wi openssh

## test with netstat
netstat -an

## optional - change password user
passwd

## optional - change password root
sudo passwd
## change to root user
sudo su

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

## check ip tinycore
ifconfig

gw@laptop – test ssh with password less

#test ssh
ssh tc@ip.tiny.core.linux

ssh

tc@box  – make persistent config

tinycore running on ram, and it will reset to ‘original’ if you reboot or poweroff. this is how to make it persistent config, and running when boot

# start openssh at start
sudo vi /opt/bootlocal.sh

# add line to start openssh
/usr/local/etc/init.d/openssh start

# backup configuration ssh
sudo vi /opt/.filetool.lst

# add line
/etc/shadow
/usr/local/etc/ssh
/home/tc/.ssh

# backup configuration
sudo filetool.sh -b

# test reboot system
sudo reboot
Advertisements

Published by

G3n1k

just to remember what i had known :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s