Skip to Content
SSH, The Secure Shell: The Definitive Guide, 2nd Edition
book

SSH, The Secure Shell: The Definitive Guide, 2nd Edition

by Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes
May 2025
Beginner to intermediate
670 pages
12h 30m
Korean
O'Reilly Media, Inc.
Content preview from SSH, The Secure Shell: The Definitive Guide, 2nd Edition

서버 실행

일반적으로 호스트 컴퓨터가 부팅될 때 SSH 서버가 호출되며 데몬으로 실행된 상태로 유지됩니다. 이 방식은 대부분의 용도로 잘 작동합니다. 또는 서버를 수동으로 호출할 수도 있습니다. 서버를 디버깅하거나 서버 옵션을 실험하거나 수퍼유저가 아닌 상태로 서버를 실행할 때 유용합니다. 수동 호출은 조금 더 많은 작업과 사전 검토가 필요하지만 일부 상황에서는 유일한 대안이 될 수 있습니다.

대부분의 경우 컴퓨터에는 하나의 SSH 서버만 실행되며, 연결당 하나씩 하위 프로세스를 생성하여 여러 연결을 처리합니다.[43] 원하는 경우 여러 서버를 실행할 수 있습니다(예: 서로 다른 TCP 포트에서 수신 대기하는 두 개의 sshd 복사본 또는 여러 버전의 sshd를 한 번에 실행할 수도 있습니다).

5.1.1 수퍼유저로 sshd 실행하기

SSH 서버는 이름을 입력하기만 하면 호출됩니다:

    $ sshd

서버는 백그라운드에서 자동으로 실행되므로 줄 끝에 앰퍼샌드가 필요하지 않습니다.

호스트 컴퓨터가 부팅될 때 서버를 호출하려면 시스템의 적절한 시작 파일(예: Linux의 경우 /etc/rc.local )에 적절한 줄을 추가합니다. 예를 들어

    # Specify the path to sshd.
    SSHD=/usr/local/sbin/sshd
    # If sshd exists and is executable, run it and echo success to the system console.
    if [ -x "$SSHD" ]
    then
      $SSHD && echo 'Starting sshd'
    fi

OpenSSH와 Tectia는 모두 각 유닉스 변형의 적절한 디렉토리에 있는 시작 또는 부팅 스크립트(즉, System-V 스타일의 초기화 제어 스크립트)와 함께 제공됩니다. 예를 들어, Linux의 경우 스크립트는 OpenSSH의 경우 /etc/init.d/sshd, Tectia의 경우 /etc/init.d/sshd2입니다[44].

5.1.2 일반 사용자로 sshd 실행하기

여러 단계를 미리 완료하면 모든 사용자가 sshd를 실행할 수 있습니다:

  1. 시스템 관리자의 허가를 받습니다.

  2. 호스트 키를 생성합니다.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

SSH, The Secure Shell: The Definitive Guide, 2nd Edition

SSH, The Secure Shell: The Definitive Guide, 2nd Edition

Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes
Working with SSH

Working with SSH

ACI Learning, Don Pezet

Publisher Resources

ISBN: 9798341656383