很多linux 默认都没有开放 root 登录,操作的时候会因为权限的问题很麻烦。
sudo -i / -su root ,可以在 putty 里面切换到root
winscp 其实也可以:http://winscp.net/eng/docs/faq_su
Use sudo on Login
In some cases (with Unix/Linux server) you may be able to use sudo
command straight after login to change a user, before file transfer session starts.
FTP protocol does not allow this.
The SFTP and SCP protocols allow for this, but the actual method is platform dependent.
With SFTP protocol, you can use SFTP server option on SFTP page of Advanced Site Settings dialog to execute SFTP binary under a different user. With OpenSSH server, you can specify:
sudo /bin/sftp-server
Note that SFTP server binary may be located elsewhere2) (e.g. in /usr/lib/sftp-server
, /usr/lib/openssh/sftp-server
or /usr/libexec/openssh/sftp-server
).
With SCP protocol, you can specify following command as custom shell on the SCP/Shell page of Advanced Site Settings dialog:
sudo -s