[태그:] mobaxterm

  • Ubuntu OpenSSH and MobaXterm Setup: Remote Server Access Guide

    Ubuntu OpenSSH and MobaXterm Setup: Remote Server Access Guide

    This guide is a fuller English adaptation of the original Korean article about installing OpenSSH on Ubuntu and using MobaXterm for remote access. The source post explains the SSH protocol, OpenSSH features, installation checks, server packages, and MobaXterm installation for Windows users.

    Ubuntu OpenSSH concept and setup
    Ubuntu OpenSSH concept and setup.

    Original Korean article: Ubuntu OpenSSH 설치 및 MobaXterm 설치

    1. What OpenSSH Is and Why It Matters

    installing OpenSSH on Ubuntu
    installing OpenSSH on Ubuntu.

    OpenSSH and the SSH protocol

    SSH is a secure protocol for remote login and remote command execution. Compared with older tools such as telnet and rlogin, SSH provides encrypted communication and stronger authentication. This is why SSH is a basic requirement for Linux server administration.

    The original article notes that SSH1 is no longer supported in modern OpenSSH releases, while SSH2 was developed to improve security, avoid earlier patent issues, and address data integrity problems. SSH2 supports a variety of symmetric and asymmetric cryptographic choices.

    OpenSSH is one of the most widely used tools for SSH-based remote access. It encrypts traffic to reduce the risk of eavesdropping, connection hijacking, and other network attacks. It also supports tunneling, multiple authentication methods, and detailed configuration options.

    Tools included in the OpenSSH family

    The OpenSSH suite includes client and server tools. Remote work can be performed with ssh, scp, and sftp. Key management involves tools such as ssh-add, ssh-keysign, ssh-keyscan, and ssh-keygen. The service side includes sshd, sftp-server, and ssh-agent.

    2. Key Features of OpenSSH

    checking SSH service status
    checking SSH service status.

    Open source and widely usable

    OpenSSH is an open source project that can be used freely, including in commercial contexts. Because the code is public, it benefits from review, reuse, bug discovery, and long-term maintenance by a broad community.

    Strong encryption before authentication

    OpenSSH starts encryption before authentication, which helps prevent passwords and other sensitive information from being sent in plain text. It supports modern algorithms and key types such as AES, ChaCha20, RSA, ECDSA, and Ed25519, while older options are gradually removed or discouraged.

    X11 forwarding

    X11 forwarding allows remote graphical traffic to be sent through an encrypted SSH channel. This can be useful when running graphical applications from a remote Unix-like environment while reducing the risk of someone snooping on the session or injecting commands into an unprotected connection.

    Port forwarding for secure tunnels

    Port forwarding creates encrypted channels for TCP/IP connections. This can protect legacy services or internal tools by routing them through SSH. For example, insecure protocols can be wrapped in an encrypted tunnel when a direct secure alternative is not available.

    Strong authentication methods

    OpenSSH supports authentication methods such as public keys, one-time passwords, and in some environments Kerberos. Public key authentication is especially common for server administration because it reduces reliance on reusable passwords and can be combined with passphrases and agents.

    Agent forwarding and compression

    Agent forwarding lets a local authentication agent hold keys and forward authentication through an SSH connection without storing private keys on every remote system. OpenSSH also supports optional compression, which can improve performance over slower network links.

    3. Installing and Checking OpenSSH on Ubuntu

    MobaXterm download and install
    MobaXterm download and install.

    If Ubuntu was installed with server features, SSH may already be installed. The original tutorial checks service status with systemctl. Even if the package is installed, you should confirm that the service is running and enabled.

    OpenSSH usually runs as ssh.service on Ubuntu. The installed package list may include openssh-client, openssh-server, and an SFTP server package. For remote login into the Ubuntu machine, openssh-server is essential.

    After installation, enable the service so that it starts automatically on boot. Then reboot or restart the service in a controlled way and verify that SSH is still available.

    4. Preparing MobaXterm for SSH Access from Windows

    connecting to Ubuntu server with SSH
    connecting to Ubuntu server with SSH.

    Why MobaXterm is useful

    MobaXterm is a remote access program for Windows. It is convenient for programmers, webmasters, and IT administrators because it combines SSH sessions with additional remote network tools. It can provide SSH, X11, RDP, VNC, FTP, MOSH, and Unix-like commands from a Windows desktop environment.

    When connecting to a remote server through SSH, MobaXterm can automatically show a graphical SFTP browser. This makes it easier for beginners to inspect and edit remote files while also using a terminal session.

    Download and install MobaXterm

    The original article downloads MobaXterm from the official Home Edition page and proceeds with the installer edition rather than the portable edition. After downloading, unzip or run the installer package and complete the installation wizard.

    After launching MobaXterm, you can create an SSH session by entering the server address, username, and port. If SSH uses a non-default port, the client setting must match the server configuration and firewall rules.

    5. Connection Checks Before Remote Work

    Remote access depends on several conditions working together: the server IP address is correct, OpenSSH server is installed, ssh.service is running, the firewall allows the SSH port, the username exists, and the authentication method is valid.

    If connection fails, do not assume the client is the problem. Check service status, port configuration, firewall rules, network reachability, and credentials. In server administration, connection troubleshooting is often a chain of small checks.

    6. Security After the First Successful Login

    Once SSH works, improve security. Use strong passwords or public key authentication, limit unnecessary users, keep packages updated, document the port, and avoid exposing other services without need. Remote access should be convenient enough to operate but strict enough to protect the server.

    The original article connects this topic to related Ubuntu setup tasks such as SSH port configuration, VirtualBox installation, Ubuntu installation, update and upgrade, and firewall settings. OpenSSH is often the gateway to all later Linux server work.

    Related Reading

    Continue with these related Thinknote English articles in the Server & Infrastructure cluster.

    FAQ

    What is this article about?

    This article is part of Thinknote’s English server and infrastructure archive. It focuses on practical Linux, Ubuntu, web-server, database, SSH, firewall, or hosting operations that readers can adapt to their own environment.

    How should I use this guide?

    Use it as a practical checklist and concept guide. Before applying commands on a live server, verify package names, OS versions, ports, and backup requirements for your own setup.

    Where can I read the original Korean article?

    The original Korean article is available here: Ubuntu OpenSSH and MobaXterm Setup: Remote Server Access Guide.

  • Ubuntu SSH 포트 설정 및 연결

    Ubuntu SSH 포트 설정 및 연결

    1. Ubuntu SSH 포트 개방

    SSH 포트 개방을 위해서는 2가지 작업을 진행해야 합니다. 첫 번째는 ubuntu iptables에 22번 포트를 개방해야 하고 두 번째는 virtualbox의 포트를 포워드 해야 합니다. 만약 외부 ip를 사용해서 ubuntu를 설치 했다면 첫 번째 작업만 해도 무방합니다.
    만약 호스트 PC가 공유기에 물려 있다면 DMZ 설정 및 포트 포워드로 22번 포트를 호스트 PC에 연결해야 외부에서 접속이 가능합니다.

    1) 기본 환경 구성

    지금부터 시작되는 내용은 다음과 같은 환경을 가정하고 진행합니다.

    • Virtual로 ubuntu가 설치됨
    • 호스트 PC는 내부 공유기로부터 IP를 할당
    • Virtual IP: 10.0.2.15

    2) Iptables SSH 포트 허용

    SSH 포트는 22을 사용합니다. Iptables에서 tcp 22번 포트를 사용하도록 열어줍니다.

    • -A : 체인에 추가
    • -p tcp : 프로토콜 tcp
    • -m tcp : tcp 일치, 확장일치
    • –dport : 포트번호
    • — j : 대상 점프
    • ACCEPT : 허용
    sudo iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT

    iptables에 체인이 등록되었는지 규칙을 출력합니다. 추가된 규칙을 저장하고 Reload 합니다.

    sudo iptables -S
    sudo netfilter-persistent save
    sudo netfilter-persistent reload
    [Step 1] ubuntu ssh 포트 추가

    Read in English

    ubuntu의 IP를 확인하겠습니다. ip addr명령으로 IP를 확인하면 다음과 같이 출력되며 ubuntu의 IP가 10.0.2.15인 것으로 확인됩니다.

    ip addr
    [Step 2] ubuntu ip 확인

    2. VirtualBox의 SSH 포트 포워딩

    ubuntu의 SSH 포트 개방으로 Ubuntu의 연결은 허용되었지만 아직 호스트 컴퓨터에서는 접속을 할 수 없습니다. 호스트 컴퓨터에서 MobaXterm으로 ubuntu에 접속하기 위해서는 VirtualBox에서 포트를 포워딩 해야 합니다.

    VirtualBox에서는 가상머신을 종료하지 않고 설정에서 포트 포위딩을 할 수 있습니다. 가상PC 설정의 네트워크를 클릭합니다.

    virtualbox ssh
    [Step 1] virtualbox 관리자 실행
    virtualbox ssh
    [Step 2] virtualbox 네트워크 설정

    네트워크 Advanced를 확장하여 포트 포워팅 버튼을 클릭합니다.

    virtualbox ssh
    [Step 3] virtualbox 네트워크 포트 포워딩 추가

    포트 포워팅 규칙을 추가하기 위해 오른쪽 상단의 플러스 아이콘을 클릭합니다. 이름[SSH], 프로토콜[TCP], 호스트 IP(로컬호스트로 접속하기 때문에 비워두어도 됩니다.)[ ], 호스트 포트[22], 게스트 IP(ubuntu IP는 ip addr 명령으로 확인할 수 있습니다.)[10.0.2.15], 게스트 포트[22]를 입력합니다.

    virtualbox ssh
    [Step 4] virtualbox ssh 포트(22) 포워딩 설정

    3. MobaXterm으로 Ubuntu 터미널 접속

    MobaXterm을 실행합니다. 아직은 등록된 Session이 없기 때문에 새로운 Session을 등록하기 위해 왼쪽 상단의 Session을 클릭합니다.

    mobaxterm ssh
    [Step 1] MobaXterm 실행

    SSH를 사용해서 ubuntu에 접속하기 위해서 왼쪽 상단의 SSH를 클릭합니다.

    mobaxterm ssh
    [Step 2] MobaXterm ssh session

    Remnote Host는 ubuntu IP가 아닌 호스트 PC의 IP를 뜻합니다. Host IP는 cmd명령으로 호스트 PC의 터미널을 실행하고 ipconfig /all 명령으로 확인할 수 있습니다. 여기서는 localhost IP로 접속하기 때문에 127.0.0.1을 입력하겠습니다. OK 버튼을 클릭해서 창을 닫습니다.

    mobaxterm ssh
    [Step 3] MobaXterm ssh session 추가(localhost 및 host IP)

    MobaXterm의 왼쪽 user session 부분에 127.0.0.1 세션이 추가된 것을 확인할 수 있습니다. 해당 세션을 더블 클릭해서 로그인 터미널이 나타나면 포트가 정상적으로 개방된 것입니다.

    mobaxterm ssh
    [Step 3] ubuntu 접속

    함께 읽으면 좋은 글

  • Ubuntu OpenSSH 설치 및 MobaXterm 설치

    Ubuntu OpenSSH 설치 및 MobaXterm 설치

    1.  OpenSSH 개념 및 특징

    1) OpenSSH 개념

    OpenSSH의 개념을 이해하고 OpenSSH 설치 및 MobaXterm 프로그램을 사용하여 Ubuntu에 원격 접속하도록 하겠습니다. SSH 프로토콜은 telnet 및 rlogin에 비해 향상된 보안을 지원합니다. SSH 프로토콜은 SSH1 및 SSH2에서 사용이 가능합니다.

    SSH1 유형은 7.6 release부터는 지원되지 않고 있습니다. SSH2 유형은 RSA와 관련된 특허를 우회하며 CRC 데이터 무결성 문제를 해결하기 위해 발명되었습니다. 또한 SSH2 프로토콜은 대칭 및 비대칭 암호에 대한 다양한 선택 사항과 기능을 지원합니다.

    그래서 OpenSSH는 SSH 프로토콜을 사용한 원격 접속에 가장 이상적인 도구로 봐도 좋습니다. OpenSSH는 도청, 연결 하이재킹 및 기타 공격을 제어하기 위해 모든 드래픽을 암호화 합니다. 그리고 대규모 보안 터널링, 다양한 인증, 정교한 옵션 구성을 제공합니다.

    OpenSSH 제품군은 다음 도구로 구성됩니다.

    • 원격 작업은 ssh , scp 및 sftp 를 사용하여 수행됩니다 .
    • ssh-add , ssh-keysign , ssh-keyscan 및 ssh-keygen 을 사용한 키 관리 .
    • 서비스 측은 sshd , sftp-server 및 ssh-agent 로 구성 됩니다.

    2) OpenSSH 특징

    OpenSSH는 완전한 오픈 소스 프로젝트로 인터넷을 통해 누구나 무료로 사용할 수 있습니다. 코드 재사용 및 코드 검토를 통해 누구나 버그를 찾고 수정할 수 있습니다. OpenSSH는 모든 목적으로 사용할 수 있으며 여기에는 상업적 사용이 포함됩니다. 

    강력한 암호화(AES, ChaCha20, RSA, ECDSA, Ed25519…)는 인증 전에 시작되며 암호나 기타 정보는 암호화되지 않은 상태로 전송됩니다. 다양한 암호 및 키 유형을 사용할 수 있으며 레거시 옵션은 일반적으로 합리적인 시간 내에 단계적으로 제거됩니다.

    X11 전달은 원격 X Windows 트래픽의 암호화를 허용하므로 아무도 원격 xterm을 스누핑하거나 악의적인 명령을 삽입할 수 없습니다. 프로그램은 서버 시스템에서 자동으로 디스플레이를 설정하고 보안 채널을 통해 모든 X11 연결을 전달합니다. 

    포트 포워딩(레거시 프로토콜을 위한 암호화된 채널)을 사용하면 암호화된 채널을 통해 TCP/IP 연결을 원격 시스템으로 포워딩할 수 있습니다. POP와 같은 안전하지 않은 인터넷 응용 프로그램을 보호할 수 있습니다.

    강력한 인증(공개 키, 일회용 암호)은 IP 스푸핑, 가짜 경로 및 DNS 스푸핑과 같은 여러 보안 문제로부터 보호합니다. 일부 인증 방법에는 공개 키 인증, s/key를 사용한 일회용 암호 및 Kerberos를 사용한 인증(-portable에서만)이 포함됩니다.

    에이전트 포워딩은 사용자의 랩탑 또는 로컬 워크스테이션에서 실행되는 인증 에이전트를 사용하여 사용자의 인증 키를 보유할 수 있습니다. OpenSSH는 모든 연결을 통해 자동으로 연결을 인증 에이전트로 전달하며 네트워크의 모든 시스템(사용자 자신의 로컬 시스템 제외)에 인증 키를 저장할 필요가 없습니다. 

    선택적 데이터 압축은 암호화 전에 데이터를 압축하면 느린 네트워크 링크의 성능이 향상됩니다.

    2.  OpenSSH 설치 및 확인

    1) OpenSSH 설치

    설치부터 함께 했다면 SSH는 설치되어 있습니다. 터미털에서 현재 상태를 확인하기 위해서 systemctl 명령어로 확인합니다.

    sudo systemctl status ssh
    ssh openssh
    [Step 1] OpenSSH 상태 확인

    Read in English

    OpenSSH를 설치 했지만 서비스는 ssh.service로 작동합니다. 이미지의 Cgroup부분을 면 /system.slice/ssh.service로 나와 있습니다. 실제 설치된 패키지를 확인해 보겠습니다. apt list 명령을 활용해서 openssh와 관련해 설치된 패키지를 확인하면 3개의 패키지가(openssh-client, openssh-server, open-sftp-server) 설치되 있습니다.

    sudo apt list openssh*
    ssh openssh
    [Step 2] ssh.service enable

    외부에서 원격으로 접속하기 위해서는 openssh-server가 반드시 설치되어 있어야 합니다. 만약 설치가 되지 않았다면 다음 명령어로 openssh-server를 설치합니다. 그리고 부팅시 자동 실행되도록 enable 합니다.

    sudo apt install openssh-server
    ssh openssh
    [Step 3] openssh 설치
    sudo systemctl enable ssh
    ssh openssh
    [Step 4] ssh.service enable

    재부팅 후 ssh가 서비스되고 있는지 확인합니다.

    reboot
    sudo systemctl status ssh
    ssh openssh
    [Step 5] OpenSSH 상태 확인

    3.  SSH 원격 접속을 위한 MobaXterm 설치

    1) MobaXterm 특징

    MobaXterm은 원격 접속 프로그램으로 Windows 응용 프로그램에서 프로그래머, 웹마스터, IT 관리자가 보다 간단한 방식으로 원격 작업을 위해 맞춤화된 많은 기능을 제공합니다.

    MobaXterm은 모든 중요한 원격 네트워크 도구 (SSH, X11, RDP, VNC, FTP, MOSH, …) 및 Unix 명령 (bash, ls, cat, sed, grep, awk, rsync, …)을 Windows 데스크탑에 제공합니다.

    SSH 를 사용하여 원격 서버에 연결할 때 원격 파일을 직접 편집하기 위해 그래픽 SFTP 브라우저 가 자동으로 팝업됩니다. MobaXterm Home Edition을 무료로 다운로드하여 사용할 수 있습니다. 

    2) MobaXterm 다운로드

    MobaXterm 웹사이트에 접속하여 설치 파일을 다운로드 합니다.  파일은 installer edition과 portable edition으로 구분되는데 여기서는 installer edition으로 진행하겠습니다.

    웹페이지 : MobaXterm free Xserver and tabbed SSH client for Windows (mobatek.net)

    다운로드 페이지 : https://mobaxterm.mobatek.net/download-home-edition.html

    MobaXterm
    [Step 1] MobaXterm 사이트
    MobaXterm
    [Step 2] Home Edition 선택
    MobaXterm
    [Step 3] Installer edition 다운로드

    3) MobaXterm 설치

    MobaXterm 압축 파일을 해제하고 설치를 진행합니다.

    MobaXterm
    [Step 4] MobaXtrm 설치 프로그램 실행
    [Step 5] 동의하고 Next 클릭
    MobaXterm
    [Step 6] 기본 폴더 선택하고 Next 클릭
    MobaXterm
    [Step 7] Install 클릭
    MobaXterm
    [Step 8] 설치 진행 중
    MobaXterm
    [Step 9] Finish 클릭하여 설치 종료

    4) MobaXterm 실행

    MobaXterm 실행하면 다음과 같이 프로그램이 실행됩니다. 여기서는 창을 종료하고 접속이 가능하도록 포트 및 방화벽을 설정하도록 하겠습니다.

    MobaXterm
    [Step 10] MobaXtrm 실행 창

    함께 읽으면 좋은 글