MX Linux : Step-by-step – SSH Server MX Linux Installation

Step-by-step – SSH Server MX Linux Installation


1. Terminal Quick-Start

    How to Quick-Start with Command Line on MX Linux
    Here Command Line MX Quick-Start Guide
    Link to Step-by-Step Guide on Getting Started with Command Line in MX GNU/Linux

    First, Update the Apt Repo Sources with:

sudo apt update

    Authenticate with the User Admin Pass.
    If Got “User is Not in Sudoers file” then Look: Solution


 2. Installing SSH Server

    Then to Install SSH Server in MX Linux
    Simply play:

sudo apt install openssh-server

3. Launching SSH Server

Finally, Start SSH Server
With:

sudo service ssh start

To enable it at Boot:

sudo service ssh enable

Finally, to Stop it:

sudo service ssh stop


4. SSH Server Getting-Started Guide

Get Started with SSH Server for MX GNU/Linux
Here SSH Server Quick-Start Guide on MX Linux
Link to Getting-Started with SSH Server on MX GNU/Linux

So Now I am truly Happy if My Guide could Help you to Quick-Start with SSH Server on MX Linux!

在 MX Linux 中启用 SSH 服务器需要几个步骤:

  1. 安装 SSH 服务器。可以在终端中使用命令 "apt-get install openssh-server" 安装。

  2. 启动 SSH 服务。可以在终端中使用命令 "systemctl start ssh" 或 "service ssh start" 启动。
    注意:不同的系统启动管理程序,启动 app的命令名称,以及格式,都是有所不同的。

  3. 确保 SSH 服务随系统启动时自动运行。可以在终端中使用命令 "systemctl enable ssh" 或 "update-rc.d ssh enable" 设置。

  4. 检查 SSH 服务状态。可以在终端中使用命令 "systemctl status ssh" 或 "service ssh status" 检查。

  5. 打开防火墙端口 22 。使用命令 "ufw allow 22" 来打开

在完成上述步骤后,您就可以使用 SSH 客户端连接到 MX Linux 系统了。

注:

1. mini 版本,在启动的开始时,选择高级启动选项,可以选择不同的启动管理程序。

好像只有 mini版本才需要用户自己安装,其他版本,mxlinux已经默认就安装好了?

好像在官网上有说明,在 mxlinux在 v18版本之后,才支持 systemd 启动管理程序的,但需要自己在系统启动时的菜单中进行选择,或在系统启动之后进行设置。

2. 运行 pstree 命令,从而知晓当前系统所采用的启动管理程序。只有在知晓了启动管理程序之后,才能使用对应于这个启动管理程序的命令。

不同的启动管理程序,启动应用程序的命令名称,是不同的;命令格式也有些不同。

参考:

System has not been booted with systemd as init system (PID 1). Can‘t operate  https://blog.csdn.net/ken2232/article/details/132529761

系统启动方式:SysV / UpStart / Systemd 的区分  https://blog.csdn.net/ken2232/article/details/132531126

===========================

参考

mx linux enable ssh server
https://juejin.cn/s/mx%20linux%20enable%20ssh%20server
https://blog.csdn.net/leesun1982/article/details/130900916

$ sudo apt-get install openssh-serve

$ sudo service ssh restart
Restarting OpenBSD Secure Shell server: sshd.

$ sudo service ssh start
Starting OpenBSD Secure Shell server: sshd.
$ sudo service ssh status
sshd is running.

$ sudo service ssh stop
Stopping OpenBSD Secure Shell server: sshd.
$ service ssh status
sshd is not running ... failed!

查ssh服务是否运行
ps -ef | grep ssh

查ssh服务端口
 netstat -ntlp

cd /etc/ssh
cp sshd_config sshd_config.bak
sudo featherpad /etc/ssh/sshd_config

SSH连接服务器
ssh 用户名@IP地址 -p 端口号

lsof,List Open Files 列出当前系统打开文件的工具。
查看端口被占用
sudo lsof -i:8888 (<<port, 需要 root权限)

杀死占用端口进程
kill xxxx(这里是port的PID, 不是端口号) // 查看端口的PID命令为上面那个

lsof用法
https://www.cnblogs.com/kaishirenshi/p/12737912.html
9,列出nginx进程现在打开的文件
# -c 指定要查看的进程的名字
[root@blog ~]# lsof -c nginx


https://linuxconfig.org/linux-setup-ssh

$ sudo apt update
$ sudo apt install openssh-client
$ sudo apt install openssh-server

    In order to accept incoming connections, you will also need to allow the service through your system firewall. The commands for doing that may differ depending on your Linux distro. Use the appropriate ones below.

    On Ubuntu and systems using ufw (uncomplicated firewall):

    $ sudo ufw allow ssh

    On RHEL based distros or any others using firewalld:

    $ sudo firewall-cmd --zone=public --permanent --add-service=ssh
    $ sudo firewall-cmd --reload

    Or if you are just using iptables and no firewall frontend:

    $ sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT

That’s all there is to it. As long as there is no physical router or firewall blocking connections to the SSH server, it should be ready to accept incoming connections.

参考:

debian安装openssh-server及配置root远程登陆

  debian安装openssh-server及配置root远程登陆_debianssh开启root远程登录_喉外肌战神的博客-CSDN博客

 mx linux enable ssh server-掘金

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值