I am using laravelcollective/remote which is documented in Laravel 4.2 but this documentation does not display any information about the 6.x
version of this.
I am trying to access my external servers to run Docker
commands:
SSH::into('production')->run(["docker inspect --format='{{.Name}}' {$id}"], function($container) {
// ...
});
My configuration looks like this and is pretty basic, although it works:
'connections' => [
'production' => [
'host' => 'xx.xx.xxx.x',
'username' => 'xxx',
'password' => 'xxx',
'key' => '',
'keytext' => '',
'keyphrase' => '',
'agent' => '',
'timeout' => 10,
],
],
When I then use:
SSH::into('production')->run(['ls'], function($x) { echo $x; });
It works fine, but how secure is this? I can see I am missing 4 default fields that I assume make this more secure. How can I generate a key
, keytext
and keyphrase
and what are they?
question from:
https://stackoverflow.com/questions/65892326/how-can-i-secure-my-ssh-commands-to-a-remote-server-in-laravel 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…