在服务器管理和运维的过程中,远程连接是一项必备技能。今天就给大家分享如何使用 MobaXterm 这款功能强大的工具来远程连接 Ubuntu 服务器,无论你是新手小白还是有一定经验的技术人员,都能轻松上手!
前期准备
安装 MobaXterm
MobaXterm 可以从其官方网站(MobaXterm free Xserver and tabbed SSH client for Windows )下载,根据你的操作系统选择对应的版本进行安装。安装过程非常简单,一路点击 “下一步” 就可以完成。
确保 Ubuntu 服务器网络配置正确
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:bb:cc:2b brd ff:ff:ff:ff:ff:ff
altname enp2s1
inet 10.0.0.13/24 brd 10.0.0.255 scope global ens33
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:febb:cc2b/64 scope link
valid_lft forever preferred_lft forever
Hit:1 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu noble InRelease
Get:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Hit:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Get:5 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1020 kB]
Get:6 http://archive.ubuntu.com/ubuntu noble-updates/main Translation-en [223 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [951 kB]
Get:8 http://archive.ubuntu.com/ubuntu noble-updates/restricted Translation-en [195 kB]
Get:9 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1056 kB]
Get:10 http://archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [266 kB]
Fetched 3836 kB in 5s (762 kB/s)
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
106 packages can be upgraded. Run 'apt list –upgradable' to see them.
root@ubuntu13:~# sudo apt install openssh-server
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
openssh-server is already the newest version (1:9.6p1-3ubuntu13.9).
0 upgraded, 0 newly installed, 0 to remove and 106 not upgraded.
root@ubuntu13:~# sudo systemctl start ssh
root@ubuntu13:~# sudo systemctl status ssh
● ssh.service – OpenBSD Secure Shell server
Loaded: loaded (/usr/lib/systemd/system/ssh.
service; disabled; preset: enabled)
Active: active (running) since Thu 2025-04-17 09:08:18 UTC; 2min 21s ago
TriggeredBy: ● ssh.socket
Docs: man:sshd(8)
man:sshd_config(5)
Process: 1003 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
Main PID: 1005 (sshd)
Tasks: 1 (limit: 4553)
Memory: 3.7M (peak: 20.4M)
CPU: 68ms
CGroup: /system.slice/ssh.service
└─1005 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
使用 MobaXterm 连接 Ubuntu 服务器
打开 MobaXterm 并新建会话


配置连接参数
输入密码并连接
常见问题及解决方法
连接失败,提示 “Connection refused”(连接被拒绝)
输入正确密码后仍无法连接
通过以上步骤,你就可以轻松地使用 MobaXterm 远程连接 Ubuntu 服务器了。它不仅方便了我们在本地对服务器进行操作和管理,还大大提高了工作效率。如果在连接过程中遇到其他问题,欢迎在评论区留言,大家一起交流解决!
评论前必须登录!
注册