我试图通过ssh创建一个脚本登录服务器我不能在这个项目中使用密钥。所以我试图传递一个哈希密码,但我没有运气..这就是我所拥有的。任何帮助都会很棒。
!/usr/bin/expect -f
spawn ssh nix@server
expect "password:"
send "echo "6YepVNFkMm1YO/WwA+mZEYZrhfVStH4+01fHTCf/La0=" | \
openssl enc -base64 -d -aes-256-cbc -nosalt -pass env:passwd"
interact
以下是我得到的回报:
nix's password: extra characters after close-quote
while executing
"send "echo "6YepVNFkMm1YO/WwA+mZEYZrhfVStH4+01fHTCf/La0=" | \
openssl enc -base64 -d -aes-256-cbc -nosalt -pass env:passwd"
interact
"
答案 0 :(得分:0)
试用此解决方案:
"send "echo "6YepVNFkMm1YO/WwA+mZEYZrhfVStH4+01fHTCf/La0="
我将这些双引号替换为单引号,即"echo '6YepVNFkMm1YO/WwA+mZEYZrhfVStH4+01fHTCf/La0='
到std::vector<Vector3> vertices;
struct Patch
{
// Zero-based indices of the 16 control points in the vertices vector
uint32_t indices[4][4];
}
std::vector<Patch> patches;
希望它有所帮助。