Differences

This shows you the differences between the selected revisions of the page.

2018-11-09 2018-12-18
footnote after punctuation (martin) no summary (177.43.213.199) (hidden) (untrusted)
Line 1: Line 1:
-====== How do I change user after login (e.g. su root)? ====== 
-None of the protocols ([[sftp|SFTP]], [[ftp|FTP]] and [[scp|SCP]]) supported by WinSCP allow the user to be changed in the middle of file transfer session. You need to start the session with the correct user. 
- 
-===== Direct Login ===== 
-Easiest way is to allow direct login with the user account you need, if it is not allowed already. For accounts such as ''root'', the direct login is typically disabled by default for security reasons. So when enabling it, have security in mind. 
- 
-Particularly with SSH, you may want to keep password authentication (the most vulnerable one) disabled and use e.g. [[public_key|public key authentication]] instead. With OpenSSH server, you can do that by setting ''[[https://man.openbsd.org/sshd_config|sshd_config]]'' keyword ''PermitRootLogin'' to ''without-password''.((Even more restrictive option ''forced-commands-only'' may work with SFTP protocol, but it has not been tested.)) 
- 
-===== [[sudo]] Use sudo on Login ===== 
-In some cases (with Unix/Linux server) you may be able to use ''[[&man_ref(8,sudo)|sudo]]'' command straight after login to change a user, before file transfer session starts. 
- 
-[[ftp|FTP]] protocol does not allow this. 
The [[scp|SFTP]] and [[scp|SCP]] protocols allow for this, but the actual method is platform dependent. The [[scp|SFTP]] and [[scp|SCP]] protocols allow for this, but the actual method is platform dependent.

Last modified: by 177.43.213.199