Spetsnaz

Well-Known Member
Jun 25, 2011
78
0
56
cPanel Access Level
Website Owner
I have tried everything turning off my firewall adding my IP to white list of all I can think of and still cannot connect with SFTP.
I have given me "normal shell" "jail shell" access and still nothing.
I want to connect via port 22 since one of my clients want SFTP but I cannot turn it on or make it work.

Code:
Response:	fzSftp started
Command:	open "[email protected]" 22
Command:	Pass: *******
Status:	Connected to 37.0.xxx.xx
Error:	Fatal: unable to initialise SFTP on server: could not connect
Error:	Could not connect to server
Status:	Waiting to retry...
Status:	Connecting to 37.0.xxx.xx...
Response:	fzSftp started
Command:	open "[email protected]" 22
Command:	Pass: *******
Status:	Connected to 37.0.xxx.xx
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

Please ensure the following line is added to the /etc/ssh/sshd_config file:

Code:
Subsystem	sftp	/usr/libexec/openssh/sftp-server
Make sure it's not commented out. Remember to restart the SSH service if you make any changes.

Thank you.
 

Spetsnaz

Well-Known Member
Jun 25, 2011
78
0
56
cPanel Access Level
Website Owner
Code:
Status:	Connecting to 37.0.124.66...
Response:	fzSftp started
Command:	open "[email protected]" 22
Command:	Pass: *******
Status:	Connected to 37.0.124.66
Error:	Connection closed by server with exitcode 1
Error:	Could not connect to server
Status:	Waiting to retry...
Status:	Delaying connection for 1 second due to previously failed connection attempt...
Status:	Connecting to 37.0.124.66...
Response:	fzSftp started
Command:	open "[email protected]" 22
Command:	Pass: *******
Status:	Connected to 37.0.124.66
Error:	Connection closed by server with exitcode 1
Error:	Could not connect to server
 

Spetsnaz

Well-Known Member
Jun 25, 2011
78
0
56
cPanel Access Level
Website Owner
1) What is that?
2) I can connect to ssh with port 22, but i disabled ssh for users
3) I read that and still nothing.
 

dolphyn

Well-Known Member
Nov 27, 2001
72
0
306
cPanel Access Level
Root Administrator
sshd is the SSH daemon. If you can connect via SSH, it's running.

If SSH completely disabled for users, maybe that locks them out of SFTP as well. I don't know.
 

Spetsnaz

Well-Known Member
Jun 25, 2011
78
0
56
cPanel Access Level
Website Owner
It's fine.
Also my mail system is not sending e-mails.
After I install litespeed, mod_security, and CSF
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello,

What is fine? Did you get it working? If so, what did you do to fix it?

As for sFTP, have you tried using TLS (FTPES in FileZilla) instead? It is encrypted and doesn't require a shell to function.

As for the next statements about mail not sending, is this a new issue? If so, please definitely feel welcome to open up a new thread. Threads should be on the same topic whenever possible.

Thanks!
 

Spetsnaz

Well-Known Member
Jun 25, 2011
78
0
56
cPanel Access Level
Website Owner
Yes it got fixed, because I could actually send e-mails to gmail.
So I just have to contact the Microsoft part. Also for FTPES in filezilla where is this located?
And 1 more question, how do I check who is connect via shh right now and who has connect to root?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
In FileZilla, if you use Site Manager to configure a connection, you have the option for FTPES in the Server Type dropdown (the default is FTP).

As for SSH, you can run "w" command without the quotes to see who is logged into the machine.
 

Spetsnaz

Well-Known Member
Jun 25, 2011
78
0
56
cPanel Access Level
Website Owner
thank you and with "w" it will show all the loggins attempted or only of the currently on?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Per it's definition by running the "man w" command:

w - show who is logged on and what they are doing
It's only for active logins. You can review past login/ssh activity in the following files:

Code:
/root/.bash_history
/var/log/secure
Thank you.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
You can also get a good breakdown of logins using "last" command. This command shows all users who logged into SSH successfully at some point on the server.