EC2是AWS中用量最大的服务。基本上每一个AWS用户都会使用EC2,今天我们推荐一款可以方便的远程访问EC2的工具:MobaXterm。
关于MobaXterm
MobaXterm是一款Windows平台的功能强劲的远程访问工具。MobaXterm有免费版和商业版,使用免费版,就能够满足我们远程管理EC2服务器的各种需求。
下载安装
MobaXterm的官方网站是https://mobaxterm.mobatek.net/ , 在这个网站中,可以轻松的找到 MobaXterm的下载地址。
目前,MobaXterm的版本是12.1,我们推荐使用Portable版本。也就是免安装单文件版本。对应的下载地址为
https://download.mobatek.net/1212019080215819/MobaXterm_Portable_v12.1.zip
下载完成后,直接点击解压缩就可以使用了。为了方便,还可以在桌面创建快捷方式。
主要功能
MobaXterm主要功能
从图中可以看到,MobaXterm提供了非常丰富的连接方式支持。不仅包括常见的SSH,Telnet,X-Windows,Windows远程桌面,VNC,FTP,SFTP,串口,还支持微软新推出的WSL, S3,甚至可以模拟不同版本的IE浏览器。
连接EC2的Linux实例
在MobaXterm可以直接使用私钥连接EC2实例。例如,假设某个EC2的IP地址是13.125.72.134,使用的秘钥是soul.pem。那么在MobaXterm中只需要设置一下IP地址,本地私钥的路径和用户名,就可以直接访问 EC2实例了。
连接配置
特色功能
MobaXterm提供了很多实用的特色功能,下面我们将简单介绍其中的几个。
SFTP
在日常的运维中,经常需要在服务器和本地之间上传和下载文件。针对这个需求,MobaXterm提供了一个非常实用的侧边栏文件服务功能。参考附图,当连接到服务器之后,终端窗口的左侧会有一个对应的文件窗口。这个窗口的操作就和FTP客户端一样,可以直接通过拖拽上传和下载文件。特别值得一提的是,在这个窗口下方还有一个特殊的选项,follow terminal folder。勾选上这个选项后,如果在终端中切换目录,左侧的文件窗口也会一起进行目录切换。例如,如果在终端窗口中输入 cd /var,进入/var目录,那么左侧的文件窗口也会自动的切换到/var目录,十分的方便。
文件窗口
录制宏
MobaXterm另外一个特色功能是录制宏,打开录制宏功能后,MobaXterm可以直接记录用户在终端所有的操作。用户还可以方便的对记录好的宏进行编辑、重新执行等操作。
宏管理
分屏展示
在系统维护过程中,另外一个常见的场景是一边查看运行日志,一边运行其他命令,这个时候就需要打开多个窗口。MobaXterm提供了非常方便的分屏展示功能,主要点一下split就可以实现多个终端窗口的分屏显示。
在 MobaXterm另外一个特色功能是录制宏,打开录制宏功能后,MobaXterm可以直接记录用户在终端所有的操作。用户还可以方便的对记录好的宏进行编辑、重新执行等操作。
分屏展示
EC2 is the most widely used service in AWS. Basically every AWS user uses EC2. Today we recommend a tool that can conveniently remotely access EC2: MobaXterm.
About MobaXterm
MobaXterm is a powerful remote access tool for the Windows platform. MobaXterm has both a free version and a commercial version. Using the free version can meet all our needs for remotely managing EC2 servers.
Download and Installation
MobaXterm's official website is https://mobaxterm.mobatek.net/. On this website, you can easily find the download link for MobaXterm.
Currently, MobaXterm's version is 12.1. We recommend using the Portable version, which is a standalone version that doesn't require installation. The corresponding download link is:
https://download.mobatek.net/1212019080215819/MobaXterm_Portable_v12.1.zip
After downloading, you can use it directly by clicking to extract. For convenience, you can also create a shortcut on the desktop.
Main Features
MobaXterm Main Features
As you can see from the image, MobaXterm provides very rich support for connection methods. It includes not only common SSH, Telnet, X-Windows, Windows Remote Desktop, VNC, FTP, SFTP, serial port, but also supports Microsoft's newly launched WSL, S3, and can even simulate different versions of IE browsers.
Connecting to EC2 Linux Instances
In MobaXterm, you can directly use private keys to connect to EC2 instances. For example, assuming an EC2's IP address is 13.125.72.134 and the key used is soul.pem. In MobaXterm, you only need to set the IP address, the local private key path, and the username to directly access the EC2 instance.
Connection Configuration
Special Features
MobaXterm provides many practical special features. Below we will briefly introduce a few of them.
SFTP
In daily operations, it is often necessary to upload and download files between servers and local machines. For this need, MobaXterm provides a very practical sidebar file service function. As shown in the attached image, after connecting to the server, there will be a corresponding file window on the left side of the terminal window. The operation of this window is just like an FTP client, you can upload and download files directly by dragging. It's worth mentioning that there is a special option at the bottom of this window: follow terminal folder. After checking this option, if you switch directories in the terminal, the file window on the left will also switch directories together. For example, if you enter cd /var in the terminal window to enter the /var directory, the file window on the left will automatically switch to the /var directory, which is very convenient.
File Window
Record Macro
Another special feature of MobaXterm is recording macros. After turning on the record macro function, MobaXterm can directly record all user operations in the terminal. Users can also conveniently edit and re-execute recorded macros.
Macro Management
Split Screen Display
In the process of system maintenance, another common scenario is viewing running logs while running other commands, which requires opening multiple windows. MobaXterm provides a very convenient split screen display function. Just click split to achieve split screen display of multiple terminal windows.
Another special feature of MobaXterm is recording macros. After turning on the record macro function, MobaXterm can directly record all user operations in the terminal. Users can also conveniently edit and re-execute recorded macros.
Split Screen Display