avatar

松果工作室

欢迎光临

  • 首页
  • ESP
  • LVGL
  • freeRTOS
  • 快速笔记
  • 考察日志
  • 个人收藏
  • 我的服务
Home (Linux)Docker 中开启 SSH
文章

(Linux)Docker 中开启 SSH

Posted 2024-03-24 Updated 2024-04- 9
By YCP
2~3 min read

安装SSH

apt-get install -y openssh-server

配置 SSH

nano /etc/ssh/sshd_config

PermitRootLogin yes
PasswordAuthentication yes

重启 SSH

service ssh restart

启动脚本

nano /root/start_ssh.sh

#!/bin/bash

LOGTIME=$(date "+%Y-%m-%d %H:%M:%S")
echo "[$LOGTIME] startup run..." >>/root/start_ssh.log
service ssh start >>/root/start_ssh.log
#service mysql start >>/root/star_mysql.log   //其他服务也可这么实现

自启动

nano ~/.bashrc

# startup run
if [ -f /root/start_ssh.sh ]; then
      . /root/start_ssh.sh
fi
坑和笔记
Linux
License:  CC BY 4.0
Share

Further Reading

Sep 27, 2025

(LIB)一个好用的Modbus解析函数

一个好用的Modbus解析函数 包含03/10/04/06 #include <stdio.h> #include <stdint.h> #include <string.h> #

Jun 21, 2024

(LIB)环形滤波算法

#include <stdio.h> #include <stdlib.h> #define BUFFER_SIZE 10 // 缓冲区大小 #define THRESHOLD 180

Jun 17, 2024

(STM32)STM32 ADC采集的三种方式

采样周期 单个采集模式 ADC_Settings: 程序使用 uint16_t ADC_Read(

OLDER

(Linux)算丰学院

NEWER

(LIB)使用 FFT

Recently Updated

  • (ESP-IDF)LVGL 模拟器
  • (ESP-IDF)LVGL 自定义对象加入编码器组
  • (ESP-IDF)vscode配置文件
  • (Elec)来复再生式晶体管单管收音机
  • (ESP-IDF)ESPNOW

Trending Tags

LVGL WCH Linux Elec ThatProject freeRTOS STM ESP Flutter Others

Contents

©2026 松果工作室. Some rights reserved.

Using the Halo theme Chirpy