When I try to lớn SSH into my cluster, there are two stages. So I have to lớn enter the password twice to lớn go to lớn my trang chủ directory using SSH in a Linux terminal or PuTTY.
But when I try to lớn use WinSCP, I get these errors:
Trying SFTP:
Cannot initialize SFTP protocol. Is the host running a SFTP server?
Trying SCP:
Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).
How can I bypass this problem?
asked Nov 23, năm trước at 19:18
gk1gk1
2011 gold badge2 silver badges2 bronze badges
In WinSCP I just changed the File protocol option from "SFTP" to lớn "SCP" and tệp tin transfer is started working now.
Ahmed Ashour
5,52110 gold badges39 silver badges62 bronze badges
answered May 1, 2018 at 9:14
IRSHADIRSHAD
2,94332 silver badges39 bronze badges
I believe it will resolve your issue
Most of the time it happened due to lớn the password expired .
So you need to lớn make vì thế right click on that WinSCP user's and you'll find the option Open in PUTTY
, PFA.
After PuTTY opened, Enter Your Current Password
and it will ask to lớn reset New Password
.
And you will get access successfully, its worked for má :)
..
Dharman♦
33.1k27 gold badges99 silver badges146 bronze badges
answered Jun 24, 2021 at 6:23
2
Actually, this error may be misleading in some cases. Assuming that SSH works (which is the case for you), it could simply be the fact that your bash is outputting some text which breaks SCP.
Once you SSH into your system, is there some text printed? (Example some welcome text). If that is the case, you could put a test in your ~/.bashrc
(or whatever script is first loaded, lượt thích ~/.bash_profile
on some systems) and kiểm tra if the shell is interactive or not. If not interactive, vì thế not print anything. You can use this to lớn skip printing anything (put this at the beginning of .bashrc
) :
#Detect if in SCP
if [ -z "$PS1" ]; then
return
fi
answered Mar 26, 2018 at 17:00
ShailenShailen
8,3375 gold badges31 silver badges38 bronze badges
3
Issue: We get this error while accessing SFTP server through WIndows 10 machine: Cannot initialize SFTP protocol. Is the host running a SFTP server? WinSCP error
Solution: Provide the path of the SFTP server, as shown in a screenshot:
answered Dec 22, 2021 at 12:59
1
For general information, read documentation on the error message Cannot initialize SFTP protocol. Is the host running a SFTP server?
Though for your particular case, the problem is likely caused by the server not being able to lớn talk to lớn WinSCP for exchange of the second password. What is the second password for? The sudo
? Or an SSH tunnel to lớn a second "stage" (whatever that is)?
For sudo
/su
, refer to lớn the WinSCP FAQ How vì thế I change user after login (e.g. su root)?
For tunneling, refer to lớn the tunneling documentation.
I'm aware that this is bit vague answer, but ví is your question. If you describe, what the two passwords are for, and if you share a session log tệp tin, you might get better answers.
answered Nov 23, năm trước at 21:16
Martin PrikrylMartin Prikryl
201k64 gold badges540 silver badges1.1k bronze badges
I was having the same issue but I just switched the File Protocol from SFTP to lớn regular FTP and it worked.
answered Jul 23, 2020 at 23:49
GTS JoeGTS Joe
4,12217 gold badges61 silver badges108 bronze badges
These are different types of error that we get on WINSCP-
- WARNING: Your password has expired OR
- Cannot initialize SFTP protocol. Is the host running an SFTP server? OR
- Authentication Failed.
Try the below mentioned methods to lớn resolve the above errors:
Change File Protocol from SFTP to lớn SCP
As the error itself says there is a problem with the SFTP protocol ví try changing the File Protocol first. Explained below:
Click on edit -> choose SCP from the dropdown thực đơn given for File Protocol -> click on save and then login
Reset the Password using PuTTY
If still the problem is not resolved then finally you have the last option to lớn reset the password using PuTTY.
PFB Steps -
Right click on the current site/server/user of WINSCP -> select "Open in PuTTY" option OR Select the current site/server/user of WINSCP -> press Ctrl+P
When PuTTY is opened, enter your password and then it will ask you to lớn enter a new password.
Note: Password will not be visible to lớn you, ví enter them carefully.
You can then use the new password to lớn login. It will work for sure.
answered Jul 12, 2021 at 16:46
RichaRicha
11 bronze badge
1