kali linux – How can I use nohup command to get root access of the target machine?


I am playing ctf and I have gained access of the target machine but not as root. I can see nohup utility has a root access of the machine and I used one command to get the root access but that did not worked and the command was

nohup /bin/sh -p -c “sh -p <$(tty) >$(tty) 2>$(tty)”

-bash: $(tty)”: Permission denied

Can anybody please help me on this ???