본문 바로가기
  • Let's go grab a data
Development/Linux

6.scp 파일전송, ssh, 인증서 설치, proxy 설정, 방화벽 off 설정

by pub-lican-ai 2016. 4. 18.
반응형

ssh, scp 파일전송, 인증서 설치, proxy 설정, 방화벽 off 설정  #ssh #scp #.crt #proxy #firewall


[ssh 연결]

원격 서버에 ssh 서비스 떠 있는지 확인

[~]#netstat -an|grep 22|grep LISTEN

tcp   0 0 0.0.0.0:22 LISTEN

tcp6 0 0 :::22


root 연결(user계정 없이)

[~]#ssh IPADDRESS

root@IPADDRESS's password:

패스워드 입력 후 엔


호스트로 돌아오기

[root@localhost ~]#exit

logout

Connection to IPADDRESS closed.


user계정으로 identity_file을 통한 연결

[~]#ssh -i IDENTITY_FILE.pem USERNAME@IPADDRESS

USERNAME@IPADDRESS's password:

패스워드 입력 후 엔터


-p 옵션: 포트 설정, default 22


[scp 파일 전송]

1) 원격 서버 -> 로컬 서버로 파일전송

[~]#scp USERNAME@IPADDRESS:/home/USERNAME/FILENAME.FILETYPE /home/USERNAME


2) 로컬 서버 -> 원격 서버로 파일 전송

[~]#scp /home/USERNAME/FILENAME.FILETYPE USERNAME@IPADDRESS:/home/USERNAME


-P 옵션: 포트 설정, default 22

-r 옵션: 하위 디렉토리 및 파일 모두 복사


[인증서 설치]

[~]#cd /etc/pki/tls/certs/

[certs]#cp ca-bundle.crt ca-bundle.crt.bak

[certs]#openssl x509 -text -in /path/to/CRTNAME.crt >> /etc/pki/tls/certs/ca-bundle.crt


[파이어폭스 인증서 설치]

주소창에 about:preferences 넣고 엔터 또는 설정 - Advanced - Certificates - View Certificates - Import - CRTNAME.crt 선택 -

체크 [V]Turst this CA to identify websites.

체크 [V]Turst this CA to identify email users.

체크 [V]Turst this CA to identify software developers 

- OK

Select one automatically 선택 - 닫기


[크롬 인증서 설치]

크롬 우측 : 아이콘 클릭 - 설정 - 고급 설정 표시로 확장 - HTTPS/SSL 인증서 관리 클릭 - 인증 기관 탭 - 가져오기 - CRTNAME.crt 선택 - Open

체크 [V]Turst this CA to identify websites.

체크 [V]Turst this CA to identify email users.

체크 [V]Turst this CA to identify software developers 

- OK



[프록시 설정]

[~]#etc/environment

export http_proxy=http://PROXYSERVERIP:8080/

export https_proxy=http://PROXYSERVERIP:8080/


확인

[~]#echo $https_proxy


설정 - 네트워크 - Network proxy - Method Manual - 모든 빈칸에 PROXYSERVERIP및 포트 세팅


[방화벽 확인 및 비활성화]

[~]#iptables -L

[~]#systemctl status firewalld

[~]#systemctl stop firewalld

[~]#systemctl disable firewalld



참고 

http://faq.hostway.co.kr/?mid=Linux_ETC&page=8&document_srl=1426







반응형