e**********n 发帖数: 359 | 1 Tried the following script on linux and mac:
export ABC="ssh -o \"pubkeyAuthentication yes\" -i id_rsa myname@myserver"
$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! |
D*********s 发帖数: 555 | 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 myname@myserver" : $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!
|
O******e 发帖数: 734 | 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 myname@myserver" : $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!
|
e**********n 发帖数: 359 | 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
|
o*o 发帖数: 404 | 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?
|
O******e 发帖数: 734 | 6 This works for me on Linux:
#!/bin/bash
export ABC="ssh -o PubkeyAuthentication=yes -i $HOME/.ssh/id_dsa user@host"
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?
|