WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: doubts on ssh configuration  (Read 2140 times)

Offline feddozz

  • Newbie
  • *
  • Posts: 27
doubts on ssh configuration
« on: February 24, 2012, 08:36:50 AM »
Hi all,
I would like to use tiny core machine as an ssh server. I installed openssh.tcz via app browser and i have some doubts regarding the configuration.
Hostname: i recon i setup no hostname when i installed the OS. Somewhere I found that hostname can be setup with the following boot code, is it the correct way of doing it?
Code: [Select]
host=whateva
Password: is this the system pasword? there a guide in teh wiki. would you use that?
Do i need a username to connect with ssh?
Do i need to configure the ssh_config and sshd_config files? Can i use the default examples or it is a security suicide?
Thanks,
F

Offline Project23D

  • Newbie
  • *
  • Posts: 24
    • Technology Research and Development
Re: doubts on ssh configuration
« Reply #1 on: February 24, 2014, 12:43:57 AM »
While this post is very old, thought I would give some info.

If you were to have read the directions when installed openssh, you will see what needs to be changed, and where to put it. You can find "good security" configs all over the net. Some are better than others, but if you plan to keep your box isolated from the InterWebs, then username/password is fine.

you should create a password for root, though.

You will first need to create/edit the conf file, and then generate the keys.

if you wanting to SSH into the box, you will use sshd_config.

Default configs don't work anyway. SSH protocol 1 might still work, but use protocol 2.

this is what I use for sshd_config:
Code: [Select]
Port 22
ListenAddress: 0.0.0.0

Protocol 2
# HostKeys for protocol version 2
HostKey /usr/local/etc/ssh/ssh_host_rsa_key
HostKey /usr/local/etc/ssh/ssh_host_dsa_key
KeyRegenerationInterval 1h
ServerKeyBits 768

# Authentication:
LoginGraceTime 2m
PermitRootLogin yes
StrictModes yes
MaxAuthTries 6

RSAAuthentication yes

AuthorizedKeysFile      .ssh/authorized_keys

PasswordAuthentication yes

TCPKeepAlive yes

Subsystem       sftp       /usr/local/libexec/sftp-server


Make sure you do nothing else after changing the password, editing the sshd_config and generating the key files. Perform a backup. Then make the changes necessary to ensure your sshd server starts on boot.... if that is what you want.

Considering my box is not accessible to the InterNet, so I will use root to login. Otherwise, PermitRootLogin is no, and you need to set a strong password for tc.