• 카테고리

    질문 & 답변
  • 세부 분야

    보안

  • 해결 여부

    해결됨

bandit계정으로 로그인한 후 ssh나 git으로 연결하려고 하면 안되요 ㅠㅠ

22.09.28 22:18 작성 조회수 914

0

bandit27@bandit:/tmp/myclone1$ git clone ssh://bandit27-git@localhost/home/banidt27-git/repo

Cloning into 'repo'...

The authenticity of host 'localhost (127.0.0.1)' can't be established.

ED25519 key fingerprint is SHA256:C2ihUBV7ihnV1wUXRb4RrEcLfXC5CXlhmAAM/urerLY.

This key is not known by any other names

Are you sure you want to continue connecting (yes/no/[fingerprint])? yes

Could not create directory '/home/bandit27/.ssh' (Permission denied).

Failed to add the host to the list of known hosts (/home/bandit27/.ssh/known_hosts).

This is an OverTheWire game server.

More information on http://www.overthewire.org/wargames

!!! You are trying to log into this SSH server on port 22, which is not intended.

bandit27-git@localhost: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

동영상대로 해보면 위와 같이 나오고 password 치기도 전에 연결이 끊기는데 왜 그런지 알 수 있을까요???

답변 1

답변을 작성해보세요.

1

안녕하세요. 최근들어 서버 정책이 변경됨에따라 22번 포트로의 접속이 제한되고 있습니다.

전달하여주신 오류 메시지 에도 관련 오류가 표시되고 있습니다(!!! You are trying to log into this SSH server on port 22, which is not intended.).

이에 따라 아래와 같이 포트 번호를 지정하면 해결하실 수 있습니다.

1번은 서버에 접속한 상태에서 활용하는 명령어이며, 2번은 서버 외부에서 접속 시 사용가능한 명령어입니다. 참고하시면 되겠습니다.

 

  1. git clone ssh://bandit27-git@localhost:2220/home/banidt27-git/repo

  2. git clone ssh://bandit27-git@bandit.labs.overthewire.org:2220/home/banidt27-git/repo