Remote-ssh로 서버와 연결을 시도하는 도중 계속 "Invalid Character in hostname"이라는 에러가 발생하면서 정상적으로 연결되지 않고 계속해서 연결에 실패하는 경우가 발생했다.

구글링했더니 나와 유사한 문제가 2024년 초 부터(아마 업데이트 이후) 발생하고 있었음을 알 수 있었다.

요지는,

ssh host를 설정할 때 작성하는 아래 예시와 같은 config파일에서

Host "HostName"
    HostName xxx.xxx.xxx.xxx
    User {Username}
    Port {portnum}

Host의 이름으로 설정하는 "HostName" 이 부분에 공백이나 @와 같은 특수문자가 포함되면 안된다는 의미이다.

나는 기본적으로 설정하는 방식인 Username@HostName으로 지정해두었었는데, @ 때문에 문제가 발생했었다.

 

 

[Remote-SSH Bug]: Invalid Character in hostname · Issue #9370 · microsoft/vscode-remote-release

Is there an existing issue for this bug? I have searched the existing issues Required Troubleshooting Steps I have followed these troubleshooting steps I have tried both values of the remote.SSH.us...

github.com