
다음 파일이 있습니다 ~/.ssh/config
.
Host myserver1
Hostname myserver1.blop.com
User blup
Host myserver2
Hostname myserver2.blop.com
User blup
Host bitbucket.org
RemoteCommand # Want to not take care of global RemoteCommand
RequestTTY no
Host *
User root
RemoteCommand PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"' $SHELL;
RequestTTY yes
RemoteCommand
로그인 후 원격 쉘에서 PROMPT_COMMAND를 변경하는 모든 서버에 기본값을 원합니다 . (작동 중입니다.) bitbucket(git) 연결 옵션이 실패하고 특정 호스트에 대해 RemoteCommand
비활성화하는 방법을 찾지 못했습니다 .RemoteCommand
시도함: 없음, 빈 문자열 ""
,$SHELL;
어떤 아이디어? RemoteCommand
복원할 기본값이 있습니까 ?
답변1
none
값 으로 사용합니다RemoteCommand
.
Host bitbucket.org
RemoteCommand none
RequestTTY no
- 안대체 접근법기본 호스트 구성에서 bitbucket.org를 제외하는 것입니다.
Host * !bitbucket.org
User root
RemoteCommand PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"' $SHELL;
RequestTTY yes
- 더 나은 솔루션, 에 대한 특정 문제의 경우 명령 에 대한 설정만 적용하려면
RemoteCommand
다음을 추가하세요 .Match
ssh
이것을 파일 상단에 추가하기만 하면 됩니다.
Match exec "test $_ = /usr/bin/ssh"
RemoteCommand PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}:${PWD}\007"' $SHELL;
RequestTTY yes