I need to run an KSH script in VIO server remotely. But as VIO server is in restricted shell, I tried as below.
ssh -q -T padmin@vioserver "oem_setup_env" < script.ksh
This was worked fine last time, But when try again today I found this throwing an error.
rksh: oem_setup_env: not found
Can someone suggest how to run remotely on VIO servers.
I assume you are using keys so you can log in without using a password. If the previous sentence makes no sense to you, we can address that as well. Just ask.
VIOS is just AIX so it has a root user. You can find the path of root’s home with
echo ~root. As I recall, it is usually /. So, become root by doing the oem_setup_env. Create ~root/.ssh. Copy your public key into ~root/.ssh/authorized_keys. Check all the permissions. They should be owned by root, and be either 0700 or 0600 permissions (not readable nor writable by others). Then usessh root@host ...