Ubnt router uses WinSCP to log in directly with root permissions to operate any file

By default, it is not possible to connect to ssh with root. We want to modify some system files. We have to put it in / tmp to download and move it with mv. It is okay twice or once. Directly switch to root to execute various commands.

Well, here we can modify any file directly after logging in with Winscp, instead of logging in with root, the default WinSCP site you add is like this.

Insert picture description here

Now click Edit and click the Advanced button.

It's like this after opening.

Insert picture description here
Click, Environment-"SFTP

Fill in the SFTP server as shown
Insert picture description here

sudo /usr/lib/openssh/sftp-server

Then click the environment-"shell

Write in the shell field

sudo -i

Insert picture description here
Click OK. Although you are using your custom name after logging in, you are already rooted and can operate any file.

Published 57 original articles · won praise 0 · Views 2182

Guess you like

Origin blog.csdn.net/zhidc/article/details/105268262