ssh

Shutting down esx using asterisk.

Метки: Asterisk, shell script, ssh

1. user is non root, need to login using it.
[root@as02 log]# su asterisk
This account is currently not available.
fixing this:
[root@as02 log]# chsh -s /bin/sh asterisk
to revert:
[root@as02 log]# chsh -s /sbin/nologin asterisk
2. ssh-keygen with default values and empty password.
3. it copies 2 files in home dir currently /var/lib/asterisk/.ssh
4. use public file in destionation server.

To allow SSH access to ESXi/ESX hosts with public/private key authentication:

Generate public/private keys. For detailed instructions, see the OpenBSD Reference Manual from OpenBSD.

run ssh connection from non-root user

Метки: ssh

1. user is non root, need to login using it.

[root@as02 log]# su asterisk
This account is currently not available.

fixing this:

[root@as02 log]# chsh -s /bin/sh asterisk
to revert:

[root@as02 log]# chsh -s /sbin/nologin asterisk

2. ssh-keygen with default values and empty password.
3. it copies 2 files in home dir currently /var/lib/asterisk/.ssh
4. use public file in destionation server.
5. chmod /priv file 600 and private file dir as 700
6. connect to server ssh root@name-or-ip "command".

Вход в систему
Image CAPTCHA
Enter the characters shown in the image.