Total Pageviews

Monday 29 May 2023

Linux下的轻量级SSH服务器-TinySSH



TinySSH 是一个Linux/Unix下的开源轻量级 SSH 服务器,内存消耗不到1M,基于 CurveCP ,不依赖 OpenSS而是使用 NaCl / TweetNaCl 加密库,功能单一,配置简单, 提供稳定的数据传输安全性。
TinySSH 下载

wget https://mojzis.com/software/tinyssh/tinyssh-20160318.tar.bz2
bunzip2 < tinyssh-20160318.tar.bz2 | tar -xf -
cd tinyssh-20160318

TinySSH 安装
Unix 环境

make
sudo make install
sudo mkdir -p /etc/tinyssh
sudo /usr/sbin/tinysshd-makekey /etc/tinyssh/sshkeydir

 
Linux Debian 安装

dpkg-buildpackage -b
sudo dpkg -i ../tinyssh_*.deb ../tinyssh-run_*.deb

官网:https://tinyssh.org/

----------------------------

Prerequisites:

  • Install SSH client: OpenSSH (≥ 6.5 for Ed25519) from http://www.openssh.com/portable.html
  • Create your authorization Ed25519 key (ssh-keygen -t ed25519)
  • Put your authorization Ed25519 key to ~/.ssh/authorized_keys on server

Debian installation

apt-get install tinysshd

Unix installation

download

wget https://github.com/janmojzis/tinyssh/releases/download/20230101/20230101.tar.gz.asc
wget https://github.com/janmojzis/tinyssh/archive/20230101.tar.gz
gpg --verify 20230101.tar.gz.asc 20230101.tar.gz
gunzip < 20230101.tar.gz | tar -xf -
cd tinyssh-20230101

compile and install binaries

make
sudo make install

create directory with keys

sudo tinysshd-makekey /etc/tinyssh/sshkeydir

Unix running

Running from inetd

  • Add this line to: /etc/inetd.conf and reload inetd server
ssh stream tcp nowait root /usr/sbin/tinysshd tinysshd -l -v /etc/tinyssh/sshkeydir

Running from tcpserver

tcpserver -HRDl0 0.0.0.0 22 /usr/sbin/tinysshd -v /etc/tinyssh/sshkeydir 
from https://tinyssh.org/install.html
--------------------------------------------

Introduction

  • tinysshd is a minimalistic SSH server which implements only a subset of SSHv2 features.
  • tinysshd supports only secure cryptography (minimum 128-bit security, protected against cache-timing attacks)
  • tinysshd doesn't implement older crypto (such as RSA, DSA, HMAC-MD5, HMAC-SHA1, 3DES, RC4, ...)
  • tinysshd doesn't implement unsafe features (such as password or hostbased authentication)
  • tinysshd doesn't have features such: SSH1 protocol, compression, port forwarding, agent forwarding, X11 forwarding ...
  • tinysshd doesn't use dynamic memory allocation (no allocation failures, etc.)

Crypto primitives

from https://github.com/janmojzis/tinyssh

 

 

No comments:

Post a Comment