avatar
ssh question on linux# Programming - 葵花宝典
e*n
1
Tried the following script on linux and mac:
export ABC="ssh -o \"pubkeyAuthentication yes\" -i id_rsa [email protected]"
$ABC
on linux, I always got an error "command-line: line 0: Bad configuration
option", but on mac, it seems OK.
Anyone has encountered the same problem on linux?
Thanks a lot!
avatar
D*s
2
which means under linux, ssh client doesn't support that configuration
option

【在 e**********n 的大作中提到】
: Tried the following script on linux and mac:
: export ABC="ssh -o \"pubkeyAuthentication yes\" -i id_rsa [email protected]"
: $ABC
: on linux, I always got an error "command-line: line 0: Bad configuration
: option", but on mac, it seems OK.
: Anyone has encountered the same problem on linux?
: Thanks a lot!

avatar
O*e
3
On Linux try
ssh -o PubkeyAuthentication=yes

【在 e**********n 的大作中提到】
: Tried the following script on linux and mac:
: export ABC="ssh -o \"pubkeyAuthentication yes\" -i id_rsa [email protected]"
: $ABC
: on linux, I always got an error "command-line: line 0: Bad configuration
: option", but on mac, it seems OK.
: Anyone has encountered the same problem on linux?
: Thanks a lot!

avatar
e*n
4
The problem is that I tried
ssh -o "pubkeyAuthentication yes" ...
first, and it worked.
So what's wrong with the variable substitution?

【在 D*********s 的大作中提到】
: which means under linux, ssh client doesn't support that configuration
: option

avatar
o*o
5
I think you mean alias here.

【在 e**********n 的大作中提到】
: The problem is that I tried
: ssh -o "pubkeyAuthentication yes" ...
: first, and it worked.
: So what's wrong with the variable substitution?

avatar
O*e
6
This works for me on Linux:
#!/bin/bash
export ABC="ssh -o PubkeyAuthentication=yes -i $HOME/.ssh/id_dsa [email protected]"
exec $ABC

【在 e**********n 的大作中提到】
: The problem is that I tried
: ssh -o "pubkeyAuthentication yes" ...
: first, and it worked.
: So what's wrong with the variable substitution?

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。