Ubuntu静态IP设置、SSH登陆

sudo nano /etc/netplan/01-netcfg.yaml

1.Ubuntu设置静态IP

修改/etc/netplan/01-netcfg.yaml 或其它在/etc/netplan目录下的文件:

sudo vim /etc/netplan/01-netcfg.yaml

修改为:

#root@master:/etc/netplan# cat 50-cloud-init.yaml
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        eth0:
            dhcp4: no
            addresses:
              - 172.22.94.87/20
            routes:
              - to: default
                via: 172.22.80.1
            nameservers:
                addresses: [8.8.8.8, 8.8.4.4]
    version: 2

最后运行:

sudo netplan apply

2.Linux设置允许root ssh登陆

ubuntu下载安装ssh:

sudo apt install openssh-server

修改文件:

sudo vim /etc/sshd/ssh_config

添加下面代码:

PermitRootLogin yes


修改root密码:

sudo passwd root

重启ssh:

sudo systemctl restart sshd

其它命令

查看tcp拥塞窗口 cwnd:

ss -lni |grep cwnd
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇