Differences

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

2008-01-13 2008-01-14
no summary (88.163.78.48) (hidden) old revision restored (martin) (hidden)
Line 3: Line 3:
===== Direct Login ===== ===== Direct Login =====
-pd fk+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 ''[[http://www.openbsd.org/cgi-bin/man.cgi?query=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.)). 
 + 
 +===== Use sudo on Login ===== 
 +In some cases you may be able to use ''[[http://www.gratisoft.us/sudo/man/sudo.html|sudo]]'' command straight after login to change a user, before file transfer session starts. 
 + 
 +[[protocols#sftp|SFTP]] and [[protocols#ftp|FTP]] protocols do not allow this. 
 + 
 +The [[protocols#scp|SCP protocol]] allows for this (in the Options dialog, select Session, then look at the Protocol section in the pane to the right, and select SCP), but the actual method is platform dependant. 
 + 
 +If you are connecting to a Unix/Linux server, you can specify following command as custom shell on the //[[ui_login_scp#shell|SCP/Shell tab]]// of Login dialog (Environment -> SCP/Shell): 
 + 
 +  /bin/bash -c 'sudo su -' 
 + 
 +You can do this only if you are allowed to do ''sudo su'' without being prompted with password. See ''[[http://www.gratisoft.us/sudo/man/sudo.html|sudo]]'' documentation to learn how to do that. For example you can add following line to ''[[http://www.gratisoft.us/sudo/man/sudoers.html|sudoers]]'' file (''/etc/sudoers''): 
 + 
 +  yourusername ALL=(ALL) NOPASSWD: ALL 
 + 
 +Note that as WinSCP does not allocate TTY, you need to have ''sudoers'' option ''requiretty'' turned off (what is default).

Last modified: by martin