X-forwarding for non root user
Posted: 2022/12/28 08:29:59
I use putty running on windows laptop to connect centos8 host.
When create session I enable x-forwarding (Connection->Ssh->X11 Enable X11 forwarding, enter win_host_ip).
on centos host i set environment variable
It works good when I logon with root account, but doesn't with user account or admin account which is member of wheel group and has root access in /etc/sudoers
At /etc/ssh/sshd_config
How to fix the problem?
Which permissions user should have to use x-forwarding?
When admin account which is member of wheel group and has root sudo access remote putty ssh console starts with "$" sign, and only after sudo or su command console has "#" sign. When root logons remotely console starts with "#" sign.
How let admin user console start with "#" sign without sudo or su?
When create session I enable x-forwarding (Connection->Ssh->X11 Enable X11 forwarding, enter win_host_ip).
on centos host i set environment variable
Code: Select all
export DISPLAY=win_host_ip:0.0
Code: Select all
admin ALL=(ALL) ALL
Code: Select all
PermitRootLogin yes
Which permissions user should have to use x-forwarding?
When admin account which is member of wheel group and has root sudo access remote putty ssh console starts with "$" sign, and only after sudo or su command console has "#" sign. When root logons remotely console starts with "#" sign.
How let admin user console start with "#" sign without sudo or su?