ubuntu修改ssh端口

Every time I connect to my Ubuntu development server through my ssh client, I receive the same message and I’m getting tired of seeing it, so I decided to change the message to something else.

每次我通过ssh客户端连接到Ubuntu开发服务器时,都会收到相同的消息,并且我讨厌看到它,因此决定将消息更改为其他内容。

Here’s the message that I get every time:

这是我每次收到的消息:

Linux superfast 2.6.20-16-generic #2 SMP Thu Jun 7 19:00:28 UTC 2007 x86_64

Linux超快2.6.20-16-通用#2 SMP Thu Jun 7 19:00:28 UTC 2007 x86_64

The programs included with the Ubuntu system are free software;the exact distribution terms for each program are described in theindividual files in /usr/share/doc/*/copyright.

Ubuntu系统随附的程序是免费软件;每个程序的确切发行条款在/ usr / share / doc / * / copyright中的各个文件中描述。

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted byapplicable law.

在适用法律允许的范围内,Ubuntu绝对不提供担保。

Last login: Mon Aug 13 01:05:46 2007 from ipaddress removed

上次登录时间:从ipaddress删除的2007年8月13日星期一01:05:46

geek@superfast:~$

geek @ superfast:〜$

Changing this message requires editing two different files. The first three sections can be modified by editing the following file:

更改此消息需要编辑两个不同的文件。 可以通过编辑以下文件来修改前三个部分:

/etc/motd

/ etc / motd

This file contains the linux build number as well as the Ubuntu warranty message. I don’t find this particularly useful, so I removed all of it and replaced it with my own message.

该文件包含linux内部版本号以及Ubuntu保修消息。 我觉得这不是特别有用,因此我删除了所有内容,并用自己的信息替换了它。

To disable the last login message (which I don’t recommend doing), you will need to edit the following file in sudo mode:

要禁用上一次登录消息(我不建议这样做),您将需要在sudo模式下编辑以下文件:

/etc/ssh/sshd_config

/ etc / ssh / sshd_config

Find this line in the file and change the yes to no as shown:

在文件中找到此行,然后将yes更改为no,如下所示:

PrintLastLog no

PrintLastLog否

Now when you login, you’ll get a blank prompt, although I wouldn’t necessarily recommend it because it’s useful to see the last login to the system for security reasons. This is my prompt now:

现在,当您登录时,您会得到一个空白提示,尽管我不一定会推荐它,因为出于安全原因,最后一次登录系统很有用。 现在是我的提示:

This is a superfast system. Please max out the cpu accordingly.

这是一个超快的系统。 请相应地最大化CPU。

Last login: Mon Aug 13 01:24:14 2007 from ipaddress removedgeek@superfast:~$

上次登录时间:2007年8月13日星期一01:24:14从ipaddress删除geek @ superfast:〜$

Linux is really great.

Linux真的很棒。

翻译自: https://www.howtogeek.com/howto/ubuntu/change-ssh-welcome-banner-on-ubuntu/

ubuntu修改ssh端口

ubuntu修改ssh端口_在Ubuntu上更改SSH欢迎横幅相关推荐

  1. ubuntu 查看对外端口_[mcj]Ubuntu如何查看已开放端口|Ubuntu开放关闭指定端口方法...

    有时候我们经常无法连接服务器的某些端口,这时就需要查看一下这些端口是不是放行了,最简单的方法就是使用ufw工具,步骤如下. 1 安装ufw sudo apt install ufw 1 sudo ap ...

  2. linux设置默认终端模拟器,ubuntu终端默认设置_在Ubuntu Linux上设置默认终端模拟器...

    ubuntu终端默认设置_在Ubuntu Linux上设置默认终端模拟器 ubuntu终端默认设置_在Ubuntu Linux上设置默认终端模拟器 ubuntu终端默认设置 Ubuntu has a ...

  3. Ubuntu 修改tomcat端口

    Ubuntu 修改tomcat端口 # vi /etc/default/tomcat6 按a进入编辑模式 AUTHBIND=yes  (默认为#AUTHBIND=no) 按Esc键退出编辑模式 :wq ...

  4. linux 更改ssh端口_如何在Linux中更改SSH端口-简易指南

    linux 更改ssh端口 The default port on SSH is 22. But for security reasons, it's a good idea to change SS ...

  5. 部署k8s时ssh端口不是22导致创建ssh session failed问题

    项目场景:部署k8s时ssh端口不是22导致创建ssh session failed问题 (SHH端口代理) 项目场景:部署k8s,日志显示错误不能创建ssh连接错误,由于主机服务器配置的ssh端口为 ...

  6. ubuntu修改服务器端口,服务器环境之4:ubuntu14.04安装tomcat,端口修改

    一.下载tomcat 二.上传服务器并解压 1.创建文件夹 mkdir /usr/java/tomcat cd /usr/java/tomcat 2.上传 rz -e 弹出窗口中选择下载好的tar.g ...

  7. linux打开端口_在Linux上打开端口

    linux打开端口 Before we learn about opening a port on Linux, let's understand what network ports are. A ...

  8. ssh 端口_【科普】SSH都不懂,还搞什么网络

    今天小编为大家分享一篇关于SSH 的介绍和使用方法的文章.本文从SSH是什么出发,讲述了SSH的基本用法,之后在远程登录.端口转发等多种场景下进行独立的讲述,希望能对大家有所帮助. 1. 什么是SSH ...

  9. linux系统ssh服务无法启动,Linux上的SSH无法启动

    问题 Linux上的SSH无法启动, 报告/var/empty/sshd must be owned by root and not group or world-writable 解决方案 首先通过 ...

最新文章

  1. 简析正则表达式的使用
  2. 基于jQuery的图片异步加载和预加载实例
  3. centos7 ifconfig命令找不到_centos7+mysql+gunicorn+flask项目部署
  4. header python 环境信息_Python开发必备:如何建立一个完美的项目工程环境
  5. Java黑皮书课后题第3章:3.12(回文数字)编写一个程序,提示用户输入一个三位的整数,然后确定它是否是回文数
  6. 经典面试题 之 子数组之和最大值
  7. OpenCV+python实现视频文件读写
  8. glassfish_具有GlassFish和一致性的高性能JPA –第2部分
  9. 如何保证对象的唯一性
  10. python 枚举类型
  11. 中文 CentOS 攻略
  12. Unity MegaFiers 顶点动画
  13. [设计模式] - Singleton单例模式
  14. [转载] Python输入,输出,Python导入
  15. bzoj千题计划269:bzoj2655: calc (拉格朗日插值)
  16. python中定制类
  17. 如何转型成为一家真正发挥大数据作用的 “数据驱动型公司”?
  18. 鸿蒙系统麒麟970芯片支持,受鸿蒙系统影响,众多华为手机或要说再见,包括麒麟970机型!...
  19. win7精简_还不升级!Bug最少的win10 LTSC版,极致精简,比win7更快更干净
  20. virtualxposed使用教程_VirtualXposed

热门文章

  1. 2020-09-05:虚拟内存知道么?什么时候使用虚拟内存?虚拟内存除了扩大内存还有什么用?
  2. php多商品规格统计数量
  3. 电脑快捷修改计算机名
  4. 欧几里德算法、拓展欧几里德、中国剩余定理
  5. Canvas入门教学(3)图片与文字的绘制
  6. Android之Canvas画笔和画布
  7. 汇编idiv带符合除法指令。。。。
  8. 在深信服实习是怎样的体验(研发测试岗)
  9. 【系统集成项目管理工程师】项目资源管理
  10. 2017杭州云栖大会 智能客服专场预热 — 用心服务客户,用云助力客服