환경설정

  1. 호스트 등록
  2. 키파일 설정
  3. 권한 변경 -rw-------
  4. SSH 접속

개발 서버에 파일 올리기

  1. 환경

  2. scp로 파일 업로드

    # 파일 하나 업로드
    scp -i ~/.ssh/[키파일이름].pem 
    	./src/main/resources/static/* 
    	ubuntu@[ip주소]:/data/[파일이름]/www/
    
    # 파일 여러개 업로드
    scp -i ~/.ssh/[키파일이름].pem -r \\
      ./src/main/resources/static/img \\
      ./src/main/resources/static/js \\
      ./src/main/resources/static/index.html \\
      ubuntu@[ip주소]:/data/[파일이름]/www/
      
    # 한줄
    scp -i ~/.ssh/[키파일이름].pem -r ./src/main/resources/static/img ./src/main/resources/static/js ./src/main/resources/static/index.html ubuntu@[ip 주소]:/data/[파일이름]/www/
    
  3. 확인

    브릿지 페이지 개발 서버 웹 주소

    http://[ip주소]/index.html

  4. 403 Forbidden 오류 발생 시


확인하기

# 로컬 머신에서 원격 서버로 SSH 접속
ssh -i ~/.ssh/[키파일이름].pem [유저]@[별칭]

# SSH 키 파일의 권한과 소유자 정보 확인
ls -l ~/.ssh/[키파일이름].pem