scp, rsync를 할때 connect 타임아웃을 주는 방법입니다.
서버가 응답을 하지 않을 때, 지정 시간 후에 종료하게 됩니다.
scp
# scp -o ConnectTimeout=10 ....
-o 을 주고 ssh 에서 사용되는 옵션들을 사용할 수 있습니다.
아래와 같은 옵션들이 있습니다. 그 중에서 ConnectTimeout 를 사용했습니다.
AddressFamily
BatchMode
BindAddress
CanonicalDomains
CanonicalizeFallbackLocal
CanonicalizeHostname
CanonicalizeMaxDots
CanonicalizePermittedCNAMEs
ChallengeResponseAuthentication
CheckHostIP
Cipher
Ciphers
Compression
CompressionLevel
ConnectionAttempts
ConnectTimeout
ControlMaster
ControlPath
ControlPersist
GlobalKnownHostsFile
GSSAPIAuthentication
GSSAPIDelegateCredentials
HashKnownHosts
Host
HostbasedAuthentication
HostKeyAlgorithms
HostKeyAlias
HostName
IdentityFile
IdentitiesOnly
IPQoS
KbdInteractiveAuthentication
KbdInteractiveDevices
KexAlgorithms
LogLevel
MACs
NoHostAuthenticationForLocalhost
NumberOfPasswordPrompts
PasswordAuthentication
PKCS11Provider
Port
PreferredAuthentications
Protocol
ProxyCommand
PubkeyAuthentication
RekeyLimit
RhostsRSAAuthentication
RSAAuthentication
SendEnv
ServerAliveInterval
ServerAliveCountMax
StrictHostKeyChecking
TCPKeepAlive
UsePrivilegedPort
User
UserKnownHostsFile
VerifyHostKeyDNS
rsync
# rsync -avzP -e 'ssh -o ConnectTimeout=10' ....
rsync 도 ssh 옵션을 사용해서 타임아웃을 주었습니다.
'Linux' 카테고리의 다른 글
리눅스/윈도우용 ffmpeg static build 파일 받기 (0) | 2022.06.25 |
---|---|
리눅스에서 이용 가능한 이미지 관련 명령들 : convert, mogrify, jhead, exiftool (0) | 2022.06.24 |
리눅스에서 파일 안전하게 삭제하기 / 파일 복구 불가능하게 삭제하기 (0) | 2022.03.12 |
리눅스 쉘(shell)에서 한글이 ??? 로 나오는 문제 (0) | 2021.11.19 |
youtube 동영상의 오디오 다운받기 (0) | 2021.05.07 |