OpenSSH(Open Secure SHell)
29.1 설치
29.1.1 설치 확인
[root @edu00 linux]#rpm -qa | grep openssh
openssh-*
openssh-askpass*
openssh-server*
openssh-clients*
openssh-askpass-gnome*
29.1.2 설정 파일 확인
[root @edu00 linux]#ls /etc/ssh
primes ssh_config ssh_host_dsa_key ssh_host_dsa_key.pub
ssh_host_key ssh_host_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub
sshd_config
29.1.3 환경 설정 파일
환경설정 파일은 /etc/ssh 디렉토리
설정 파일은 ssh_config(클라이언트), sshd_config(서버)
29.1.4 서버 설정
[root @edu00 linux]#cd /etc/ssh
[root @edu00 ssh]#vi sshd_config
--------------------------------------------------------------------
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# This is the sshd server system-wide configuration file. See sshd(8) for more
information.
Port 22 <- 다른 데몬의 포트와 중복되어서는 안된다.
Protocol 2,1 <- 우선순위는 2
ListenAddress 0.0.0.0 <- 허용 IP, 모든 IP
#ListenAddress ::
HostKey /etc/ssh/ssh_host_key <- hostkey 파일의 절대경로, 암호
해독할 key값
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
ServerKeyBits 768
LoginGraceTime 600 <- lonin 시간을 설정
KeyRegenerationInterval 3600
PermitRootLogin yes <- root login 허용
#
# Don't read ~/.rhosts and ~/.shosts files
IgnoreRhosts yes <- 원격접속 불허(rcp, rlogin..)
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
StrictModes yes
X11Forwarding yes <- X-window용 프로그램 실행 가능
X11DisplayOffset 10
PrintMotd yes
KeepAlive yes
# Logging
SyslogFacility AUTHPRIV
LogLevel INFO
# obsoletes QuietMode and FascistLogging
RhostsAuthentication no
#
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
RhostsRSAAuthentication no
#
RSAAuthentication yes
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no <- Null password를 가진 계정은 접속 불허
# Comment to enable s/key passwords or PAM interactive authentication
# NB. Neither of these are compiled in by default. Please read the
# notes in the sshd(8) manpage before enabling this on a PAM system.
#ChallengeResponseAuthentication no
#SkeyAuthentication no
KbdInteractiveAuthentication yes
# To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no
# Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes
CheckMail yes <- ssh로 접속했을 때 메일 유무 확인
#UseLogin no
MaxStartups 10:30:60
#Banner /etc/issue.net
#ReverseMappingCheck yes
Subsystem sftp /usr/libexec/openssh/sftp-server
29.1.5 사용
#ssh 192.168.1.1 <- 옵션이 없으면 local 사용자 계정으로 접속, local에 root로
접속되었다면 root로 접속
#ssh webmaster@192.168.1.1
29.2 Secure ftp (sftp)
29.2.1 site:www.ssh.com
29.2.2 설정 확인
[root @edu00 linux]#vi /etc/ssh/sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
MaxStartups 10:30:60
[root @edu00 linux]#/etc/rc.d/init.d/sshd restart
29.2.3 sftp 클라이언트 설치
[root @edu00 linux]#rpm -Uvh sftp*.rpm
29.2.4 실행
[root @edu00 linux]#sftp 192.168.1.1
root@192.168.1.1's password:
sftp>
29.3 SCP (Secure CoPy)
패킷을 암호화해서 송수신
29.3.1 Client의 파일을 Server로 copy하는 경우 -- FTP의 Upload
[root @edu00 linux]#scp -p /home/linux/a.txt 192.168.1.1:/root
root@192.168.1.1's password:
a.txt 100% |********************************************************| 23 00:00
[root @edu00 linux]#scp -pr /home/linux 192.168.1.1:/root
: -r 옵션은 디렉토리를 포함하여 copy한다.
29.3.2 Client에서 Server에 있는 파일을 복사해오는 경우 -- FTP의 Download
[root @edu00 linux]#scp -pr 192.168.1.1:/home/linux/b* /home
root@192.168.1.1's password:
b.txt 100% |*******************************************************| 23 00:00
: 원격 서버(192.168.1.1)의 /home/linux 디렉토리 하위를 대상으로 b로 시작하는 모든
파일이나 디렉토리를 /home으로 복사
[root @edu00 linux]#scp -pr * 192.168.1.1:/home
: 현재 디렉토리의 파일 및 하위 디렉토리를 192.168.1.1 서버의 /home으로 모두 복사
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7930 | 9년 전 | 384 | ||
| 7929 | 9년 전 | 282 | ||
| 7928 | 9년 전 | 388 | ||
| 7927 | 9년 전 | 310 | ||
| 7926 | 9년 전 | 652 | ||
| 7925 | 9년 전 | 326 | ||
| 7924 | 9년 전 | 309 | ||
| 7923 | 9년 전 | 329 | ||
| 7922 | 9년 전 | 349 | ||
| 7921 | 9년 전 | 382 | ||
| 7920 | 9년 전 | 303 | ||
| 7919 | 9년 전 | 321 | ||
| 7918 | 9년 전 | 479 | ||
| 7917 | 9년 전 | 321 | ||
| 7916 | 9년 전 | 389 | ||
| 7915 | 9년 전 | 383 | ||
| 7914 | 9년 전 | 393 | ||
| 7913 | 9년 전 | 523 | ||
| 7912 | 9년 전 | 390 | ||
| 7911 | 9년 전 | 336 | ||
| 7910 | 9년 전 | 376 | ||
| 7909 | 9년 전 | 479 | ||
| 7908 | 9년 전 | 384 | ||
| 7907 | 9년 전 | 338 | ||
| 7906 | 9년 전 | 355 | ||
| 7905 | 9년 전 | 340 | ||
| 7904 | 9년 전 | 313 | ||
| 7903 | 9년 전 | 316 | ||
| 7902 | 9년 전 | 527 | ||
| 7901 |
|
9년 전 | 722 | |
| 7900 | 9년 전 | 554 | ||
| 7899 | 9년 전 | 356 | ||
| 7898 | 9년 전 | 355 | ||
| 7897 | 9년 전 | 309 | ||
| 7896 | 9년 전 | 338 | ||
| 7895 | 9년 전 | 439 | ||
| 7894 | 9년 전 | 361 | ||
| 7893 | 9년 전 | 301 | ||
| 7892 | 9년 전 | 355 | ||
| 7891 | 9년 전 | 732 | ||
| 7890 | 9년 전 | 1182 | ||
| 7889 | 9년 전 | 738 | ||
| 7888 |
limsy1987
|
9년 전 | 532 | |
| 7887 | 9년 전 | 520 | ||
| 7886 | 9년 전 | 408 | ||
| 7885 | 9년 전 | 380 | ||
| 7884 | 9년 전 | 382 | ||
| 7883 | 9년 전 | 374 | ||
| 7882 | 9년 전 | 393 | ||
| 7881 | 9년 전 | 409 | ||
| 7880 | 9년 전 | 534 | ||
| 7879 | 9년 전 | 430 | ||
| 7878 | 9년 전 | 1180 | ||
| 7877 | 9년 전 | 726 | ||
| 7876 | 9년 전 | 452 | ||
| 7875 | 9년 전 | 531 | ||
| 7874 |
|
9년 전 | 789 | |
| 7873 | 9년 전 | 489 | ||
| 7872 | 9년 전 | 640 | ||
| 7871 | 9년 전 | 457 | ||
| 7870 | 9년 전 | 587 | ||
| 7869 | 9년 전 | 400 | ||
| 7868 | 9년 전 | 403 | ||
| 7867 | 9년 전 | 398 | ||
| 7866 | 9년 전 | 464 | ||
| 7865 | 9년 전 | 418 | ||
| 7864 | 9년 전 | 480 | ||
| 7863 | 9년 전 | 475 | ||
| 7862 | 9년 전 | 444 | ||
| 7861 | 9년 전 | 606 | ||
| 7860 | 9년 전 | 602 | ||
| 7859 | 9년 전 | 381 | ||
| 7858 | 9년 전 | 681 | ||
| 7857 | 9년 전 | 1039 | ||
| 7856 | 9년 전 | 493 | ||
| 7855 | 9년 전 | 719 | ||
| 7854 | 9년 전 | 706 | ||
| 7853 | 9년 전 | 560 | ||
| 7852 | 9년 전 | 479 | ||
| 7851 | 9년 전 | 465 | ||
| 7850 | 9년 전 | 563 | ||
| 7849 | 9년 전 | 330 | ||
| 7848 | 9년 전 | 382 | ||
| 7847 | 9년 전 | 605 | ||
| 7846 | 9년 전 | 430 | ||
| 7845 | 9년 전 | 384 | ||
| 7844 | 9년 전 | 373 | ||
| 7843 | 9년 전 | 386 | ||
| 7842 | 9년 전 | 375 | ||
| 7841 | 9년 전 | 363 | ||
| 7840 | 9년 전 | 370 | ||
| 7839 | 9년 전 | 411 | ||
| 7838 | 9년 전 | 491 | ||
| 7837 | 9년 전 | 334 | ||
| 7836 | 9년 전 | 374 | ||
| 7835 | 9년 전 | 451 | ||
| 7834 |
|
9년 전 | 1176 | |
| 7833 | 9년 전 | 391 | ||
| 7832 | 9년 전 | 391 | ||
| 7831 | 9년 전 | 526 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기