SMEServer SSH

From Realm Business Systems Ltd
Jump to: navigation, search

SSH Restrict IP Access

config setprop sshd AllowHosts 1.2.3.4,5.6.7.8

signal-event remoteaccess-update


hosts.allow;

vim /etc/e-smith/templates-custom/etc/hosts.allow/sshd

{
    $OUT = "sshd: 10.10.10.10,192.168.0.5,10.10.10.234";
}

expand-template /etc/hosts.allow
/etc/init.d/sshd restart
cat /etc/hosts.allow


The public key is a one-line text file - you can transfer it from the AFFA server to the target server

on the AFFA HOST server:
ssh-keygen -t rsa

cat /root/.ssh/id_rsa.pub

on the TARGET server: add 
mkdir -p /root/.ssh
cd /root/.ssh
vim authorized_keys2

config setprop sshd PasswordAuthentication no
signal-event remoteaccess-update
config show sshd