SSH/ko

SSH(Secure SHell)은 유닉스 같은 운영체제의 전통 텔넷 도구를 대체하는 암호화 터미널 프로그램입니다.

게다가 원격 터미널 접근은 주요 ssh 바이너리로 제공하며, SSH 프로그램 모음은 scp(secure copy)와 sftp(secure file transfer protocol) 같은 다른 도구를 포함하며 성장하였습니다.

원래 SSH는 free가 아니었습니다(여기서 free는 무료인지 자유인지 정확하지 않아 free로 표기했습니다. 역자 주). 그러나 오늘날 젠투에 미리 설치되어 나오는 OpenBSD의 OpenSSH는 가장 인기있는 프로그램이면서 SSH 구현체의 사실상 표준으로 자리잡았습니다.

설치
Most deployments will already have OpenSSH installed (through the package). This package uses the following USE flags:

After changing USE flags, don't forget to rebuild OpenSSH:

서버
Add openssh to the default runlevel if this hasn't been done already.

Start sshd daemon with:

The OpenSSH server can be controlled like any other OpenRC-managed service:

키 생성
In order to provide a secure shell, cryptographic keys are used to manage the encryption, decryption and hashing functionalities offered by SSH.

On the first start of the SSH service, system keys will be generated. Keys can be (re)generated using the  command.

To generate the key used for SSH protocol version 1 (which usually is not enabled anymore as it has been deprecated in favor of protocol version 2):

To generate the keys for SSH protocol version 2 (DSA and RSA algorithms):

서버 설정
The SSH server is usually configured in the file, though it is also possible to perform further configuration in OpenRC's, including changing the location of the configuration file. For detailed information on how to configure the server see the sshd_config man page.

You should also study this guide for a security focused configuration.

클라이언트 설정
The ssh client and related programs (scp, sftp, etc.) can be configured in following files:

For more information read the  manual:

무 암호 인증
git 서버 관리를 위한 간단한 방법입니다.

클라이언트
On the client run the following command:

서버
사용자 계정이 서버에 있는지 확인하고 클라이언트의 파일을  파일에 넣으십시오.

단일 머신 시험
위 절차를 지역 머신에서 시험할 수 있습니다:

문제 해결
There are 3 different levels of debug modes that can help troubleshooting issues. With -v ssh prints debugging messages about its progress. This is helpful in debugging connection, authentication, and configuration problems. Multiple -v options increase the verbosity. The maximum is 3.

Death of Long-lived Connections
Many internet access devices perform network address translation (NAT), a process that enables devices on a private network such as that typically found in a home or business place to access foreign networks, such as the internet, despite only having a single IP address on that network. Unfortunately, not all NAT devices are created equal, and some of them incorrectly close long-lived, occasional-use TCP connections such as those used by SSH. This is generally observable as a sudden inability to interact with the remote server, though the ssh client program has not exited.

In order to resolve the issue, OpenSSH clients and servers can be configured to send a 'keep alive', or invisible message aimed at maintaining and confirming the live status of the link.
 * To enable keep alive for all clients connecting to your local server, set ClientAliveInterval 30 (or some other value, in seconds) within the file.
 * To enable keep alive for all servers connected to by your local client, set ServerAliveInterval 30 (or some other value, in seconds) within the file.

X11 Forwarding Not Forwarding or Tunneling!
Problem: After you have made the necessary changes to the configuration files for permitting X11 Forwarding, you find X applications are executing on the server and are not being forwarded to the client.

Solution: What is likely occurring during SSH login into the remote server or host, the  variable is either being unset or is being set after the SSH session sets it.

Test for this scenario as follows after logging in remotely:

You should get something similar to "localhost:10.0" or "localhost2.local:10.0" using server side  setting. If you're getting the usual ":0.0", check to make sure you are not unsetting or initializing the  variable within. If so, remove or comment your custom initialization of  or prevent  from executing during SSH login:

A trick would be to alias this within.