甲骨文的服务器用root
登录,提示:Please login as the user "opc" rather than the user "root".
即使已经在sshd_config
中允许了root
登录,仍然报这个错。其实,主要是Oracle Cloud Infrastructure(OCI)
的实例默认要求就是这么干的,不过我们也有办法,打开下面这个文件:
vi /root/.ssh/authorized_keys
会发现里面默认有两行:
1 2 |
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"opc\" rather than the user \"root\".';echo;sleep 10" ssh-rsa AAAAB3NzaC1yc2EAAAADADcN4gX77baQcyZ+tScj ssh-4-10 ssh-ed25519 AAAAC3NzaCUi1bYEIx root@insta10-1646 |
删掉第一行中ssh-rsa
前面的内容就可以了,只保留下面这些:
1 2 |
ssh-rsa AAAAB3NzaC1yc2EAAAADADcN4gX77baQcyZ+tScj ssh-4-10 ssh-ed25519 AAAAC3NzaCUi1bYEIx root@insta10-1646 |