OS 기술/Linux

sftp 연결시 diffie-hellman 키인증 오류

DongT 2023. 6. 19. 13:48
728x90
반응형

애져 우분투에서 IDC 윈도우서버로 sftp 연결시 diffie-hellman 키인증 오류 해결

 

[안되는거]

azureadmin@azure-vm02:~$ sftp admin@192.168.101.105

Unable to negotiate with 192.168.101.105 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1

Connection closed.

Connection closed

-- 그냥 접근시도시 처럼 인증이 실패한다고 나옴

 

[한거]

azureadmin@azure-vm02:~$ sftp -oKexAlgorithms=diffie-hellman-group1-sha1 admin@192.168.101.105

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

RSA key fingerprint is SHA256:bsaeqXE2BZwye1UkdwI5zoXoGkmfX2wS4P6Vzjxh3aw.

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

Warning: Permanently added '192.168.101.105' (RSA) to the list of known hosts.

admin@192.168.101.105's password: 패스워드

Hello, I'm freeFTPd 1.0Connected to 192.168.101.105.

sftp>

sftp> ls

CSV_File_Test       SmartHome           SmartHome_221228    smartHome_4g

sftp> dir

CSV_File_Test       SmartHome           SmartHome_221228    smartHome_4g

sftp> pwd

Remote working directory: /

sftp> !ls

dummy.txt

sftp> put dummy.txt

Uploading dummy.txt to /dummy.txt

dummy.txt                                                                             100%    6     0.8KB/s   00:00

sftp> quit

azureadmin@azure-vm02:~$ ls -l

total 4

-rw-rw-r-- 1 azureadmin azureadmin 6 Jan 27 08:49 dummy.txt

 

 

공개키 알고리즘을 수동으로 입력해줘야하는 이슈임.

ssh config 넣어서 자동으로 되게하는 방법도 찾아볼 예정.

-- 참고 URL : https://sangchul.kr/189

728x90