Sha*_*tel 5 linux ssh wildcard
我通过ssh使用通配符时遇到问题.我正在尝试运行的命令是ssh -t host "sudo ls -l /root/.ssh/id_rsa*.
我试过使用单引号,也使用sudo -s.我也试过引用通配符本身,但似乎没什么用.其他人似乎使用了这些解决方案的某些组合,但它对我没有用.有任何想法吗?
根据我的尝试,你必须生成一个新shell,以防止在以root身份进行身份验证之前扩展通配符:
ssh -t host "sudo -s bash -c \"ls -l /root/.ssh/id_rsa*\""
Run Code Online (Sandbox Code Playgroud)