小编Mah*_*ati的帖子

在 SSH 进入机器时从文件中获取密码

我想通过 SSH 连接到远程机器,但不想输入密码,而是想从另一个文件重定向它。

所以我有一个password.txt存储密码的文件。File.sh是我的 bash 文件。

File.sh

#!/bin/bash
ssh -T user@10.2.5.1
Run Code Online (Sandbox Code Playgroud)

在执行文件时,我做了:

./File.sh < password.txt
Run Code Online (Sandbox Code Playgroud)

但我还是被要求输入密码。

如何从文件中获取要输入的密码?

ssh input

5
推荐指数
2
解决办法
3021
查看次数

我的系统中处理器和内核的数量

这是输出 cat /proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 78
model name  : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
stepping    : 3
microcode   : 0x74
cpu MHz     : 2400.000
cache size  : 3072 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
flags       : fpu vme de …
Run Code Online (Sandbox Code Playgroud)

linux cpu multiprocessor command

3
推荐指数
1
解决办法
4459
查看次数

标签 统计

command ×1

cpu ×1

input ×1

linux ×1

multiprocessor ×1

ssh ×1