Problems authenticating with SFTP on Linux / UNIX servers
Posted by Van Glass on 14 November 2009 12:41 PM
You have added SFTP service to JSCAPE MFT Server but are having trouble authenticating with SFTP service. You don't have any trouble authenticating with other services such as HTTP/S or FTP/S.|
The problem is likely that you have a conflicting OpenSSH SSH/SFTP service already running on this machine that is rejecting authentication requests. JSCAPE SFTP and OpenSSH cannot listen on the same SSH/SFTP port (22) at the same time. If OpenSSH starts up before JSCAPE then it will in effect handle any client requests to port 22, not JSCAPE. If you want JSCAPE to handle SFTP requests then you must make sure that it listens on port 22 and OpenSSH listens on some other port. To do this you will need to change the port that OpenSSH service listens on. This can be achieved as follows:
As root user from system shell prompt:
1. vi /etc/ssh/sshd_config
2. Find the line that has the following:
change this to:
this will change the OpenSSH service to run on port 2222 instead of port 22. You can use a port other than 2222, as long as it is not in use by another service. This frees up the port 22 so it can be used by JSCAPE SFTP service.
3. Save changes.
4. Restart OpenSSH daemon as follows:
5. If you have already added SFTP service to JSCAPE then restart JSCAPE service so it can attempt to re-bind it's SFTP service to port 22. Otherwise, you can now add SFTP service to JSCAPE server.
Note, if you want to manage your server via SSH you will now need to connect via port 2222 instead of port 22 since this is the port that OpenSSH will be listening on. SFTP services however may be performed over JSCAPE SFTP service running on port 22.