문제

I am using ~/.ssh/config file to set my ssh options.

I want to specify different settings for scp and ssh to the same host. Is it possible to do it?

I went through the documentation, but couldn't a way to do it.

도움이 되었습니까?

해결책

I'd make a second config file, ~/.ssh/scp_config, and then use a shell alias for scp with the -F option to specify the config file:

alias scp="scp -F ~/.ssh/scp_config`

(This is an untested zsh alias; I don't know how different Bash alias' are, but the idea should be similar. Note also that this may still require you to use scp -F <file> in scripts).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top