Moderator: Project members
-
squrldude
- 500 Command not understood
- Posts: 2
- Joined: 2009-08-30 16:25
- First name: Brad
- Last name: Wheeler
QuickConnect Error — Host does not exist
#1
Post
by squrldude » 2009-08-30 16:34
I’m running FileZilla on Vista for the first time, and when I try and login to my school’s server to transfer something, I get this response:
Status: Connecting to odin.cs.uda.edu…
Response: fzSftp started
Command: open «wheeler@odin.cs.uda.edu» 22
Error: ssh_init: Host does not exist
Error: Could not connect to server
I’m not familiar enough with FileZilla, or my school’s server, to have any idea exactly what’s going on. I use PuTTY to login to the server «Odin» and haven’t had any problems with that. If anybody has any idea how to fix this it would be much appreciated!
-
botg
- Site Admin
- Posts: 34744
- Joined: 2004-02-23 20:49
- First name: Tim
- Last name: Kosse
- Contact:
Re: QuickConnect Error — Host does not exist
#2
Post
by botg » 2009-08-30 16:54
Are you sure the address is correct? Contact your server administrator for the correct address.
-
squrldude
- 500 Command not understood
- Posts: 2
- Joined: 2009-08-30 16:25
- First name: Brad
- Last name: Wheeler
Re: QuickConnect Error — Host does not exist
#3
Post
by squrldude » 2009-08-31 00:45
Turns out they posted it with a typo and didn’t think to question them, I guess I should pay a little more attention.
Thanks for the help!
21 Dec 2012 | Автор: dd |
Для администрирования удаленных серверов всем хорош ssh- и быстрый и безопасный и удобный. Но иногда бывает необходимо залить какой нибудь файл с или на администрируемый сервер, и тогда начинаешь ломать голову, как это сделать, то ли втыкать флешочку, то ли поднимать на коленке ftp сервер, который все таки является небезопасным соединением.
Естественно, что под SSH сервером можно поднять так называемый безопасный FTP сервер- SFTP, являющийся частью сервера SSH, но опять же это все требует некоторых перенастроек системы.
Но есть возможность скопировать файлы с сервера, не прибегая ни к чему, кроме ssh, так как в него по умолчанию уже встроен функционал копирования файлов scp. Естественно что копировать он может только на сервера с запущенным SSH сервером, так как обращается на прослушиваемый порт, так что для того чтобы закачать с сервера какой либо файл, на сервер с IP:1.1.1.1, говорим:
# scp /temp/file.txt username@1.1.1.1:/tmp/
где username – аккаунт имеющий ssh доступ на сервере 1.1.1.1 с правами записи в каталог /tmp/
если же мы наоборот хотим скопировать на наш сервер, то даем команду:
# scp username@1.1.1.1:/tmp/file.txt /temp/file.txt
или же вообще говорим для двух удаленных серверов:
# scp username@1.1.1.1:/tmp/file.txt username@2.2.2.2:/tmp/
Этот механизм кстати удобно использовать при создании архивов и резервных копий на нашем сервере, когда мы бэкапим базу данных и содержимое директорий, после чего закачиваем их на удаленный SSH сервер.
Тем не менее для этого необходимо иметь сторонний SSH сервер, тогда если же мы хотим скопировать файло к себе на диск, то мы должны либо поднимать у себя SSH сервер и форвардить его наружу в Интернет, либо воспользоваться протоколом PSCP, имеющего одного ограничение- на стороне сервера версия ssh должна быть 2.
Скачиваем с офф.сайта разработчиков putty, приладу pscp, кладем её в какую либо папку, после чего прописываем пути в системе
set PATH=C:pathtoputtydirectory;%PATH%
либо же кладем в одну директорию обе прилады: putty и pscp и стартуем pscp из этой локации:
C:>cd c:temp
C:>pscp username@1.1.1.1:/temp/file.txt c:temp
При выполнении команды с использованием домена у меня было вывалилась ошибка
ssh_init: Host does not exist
но оказалось, что я просто забыл скопировать putty в директорию к pscp, хотя все таки от греха поменял на IP адрес.
Rating: 10.0/10 (2 votes cast)
Передача файлов через SSH, 10.0 out of 10 based on 2 ratings
Теги: ssh, Сетевые протоколы, Сети
posted 15 years ago
-
Number of slices to send:
Optional ‘thank-you’ note:
C:DirectoryStructure>echo %PATH%
C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:Program FilesQuickTimeQTSystem;c rogram FilesPutty
C:DirectoryStructure>cd c:Program FilesPutty
C:Program FilesPutty>dir
Volume in drive C has no label.
Volume Serial Number is 0445-3F03
Directory of C:Program FilesPutty
11/23/2007 11:21 AM <DIR> .
11/23/2007 11:21 AM <DIR> ..
11/23/2007 11:21 AM 294,912 pscp.exe
1 File(s) 294,912 bytes
2 Dir(s) 34,401,947,648 bytes free
C:Program FilesPutty>pscp
PuTTY Secure Copy client
Release 0.60
Usage: pscp [options] [user@]host:source target
pscp [options] source [source…] [user@]host:target
pscp [options] -ls [user@]host:filespec
Options:
-V print version information and exit
-pgpfp print PGP key fingerprints and exit
-p preserve file attributes
-q quiet, don’t show statistics
-r copy directories recursively
-v show verbose messages
-load sessname Load settings from saved session
-P port connect to specified port
-l user connect with specified username
-pw passw login with specified password
-1 -2 force use of particular SSH protocol version
-4 -6 force use of IPv4 or IPv6
-C enable compression
-i key private key file for authentication
-noagent disable use of Pageant
-agent enable use of Pageant
-batch disable all interactive prompts
-unsafe allow server-side wildcards (DANGEROUS)
-sftp force use of SFTP protocol
-scp force use of SCP protocol
C:Program FilesPutty>pscp C:DirectoryStructureLogon.gif betty@penguin:testSCP
ssh_init: Host does not exist
C:Program FilesPutty>ping penguin
Pinging penguin.betty [xxx.xxx.x.x] with 32 bytes of data:
Reply from xxx.xxx.x.x: bytes=32 time<1ms TTL=64
Reply from xxx.xxx.x.x: bytes=32 time=1ms TTL=64
Reply from xxx.xxx.x.x: bytes=32 time=1ms TTL=64
Reply from xxx.xxx.x.x.2: bytes=32 time<1ms TTL=64
Ping statistics for xxx.xxx.x.x:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
Мой Ubuntu
ubuntu@ip-172-31-81-180:~$ sudo su
root@ip-172-31-81-180:/home/ubuntu#
Подсказка CMD:
C:UsersgsrteDownloads>pscp C:UsersgsrteDownloadstomcat7.zip ubuntu@ip-172-31-81-180:/home/ubuntu/tomcat7
Ошибка:
ssh_init: Host does not exist
Кто-нибудь может объяснить ошибку ssh_init. Я запустил ec2 в общедоступном экземпляре, а затем с помощью putty подключился к серверу ubuntu, используя имя пользователя ubuntu, а также пользователя root sudo su
. Есть идеи относительно основной причины ssh_init: host does not exist error
? Высоко оценен.
2 ответа
Лучший ответ
Это потому, что это на самом деле ваши серверы hostname
, а не IP-адрес.
Большинство имен хостов довольно просты, например, stackoverflow.com, состоящий из имени и домена верхнего уровня или TLD, в этом случае имя — stackoverflow, а TLD — .com
В вашем примере, ip-172-31-81-180
, у вас может быть действительное имя домена , но нет TLD, но вы должны помнить, что на серверах Linux ваше имя хоста может быть любым, Я мог бы указать имя хоста моего сервера, например, whitehouse.gov, но это не значит, что это так
При этом я бы предположил, что имя хоста вашего сервера фактически получено из реального IP-адреса, и, следовательно, ваш IP-адрес для этого сервера, вероятно, 172.31.81.180
1
Zachary Craig
7 Фев 2018 в 12:19
В дополнение к приведенному выше ответу я также видел эту ошибку, когда сервер защищен паролем и был введен неправильный пароль. Возможно, проверьте, чтобы убедиться, что вам не нужен пароль для подключения, и если вы все же убедитесь, что пароль отправляется на сервер правильно.
0
Shanna Mae
4 Мар 2019 в 18:03
«Host does not exist»
- Reply to topic
- Log in
Advertisement
-
rickyj
Guest
2008-05-28 20:32
I receive the «Host does not exist» message when trying to use the /script=filename option. However, when I use manually enter the same information that is in the file using winscp interactively, I can login to the server without any problems. Why??????
Reply with quote
Advertisement
-
martin◆
Site Admin - Joined:
- 2002-12-10
- Posts:
- 38,466
- Location:
- Prague, Czechia
2008-05-30
That doesn’t make any sense.
1) Do you use the same binary (exe) for GUI and the script? And from the same directory? From the same host?
2) Please post the script.
3) Post a log file of success in GUI and failure with script.
Reply with quote
-
Grandilo
Guest
2008-08-04 14:47
Hello i have the same problem, when i lauch the script in console mod, i have «host does not exist» but if i write open in winscp console and my @ip of my server, it works
my script :
option batch on option confirm off open root@172.20.20.2 option transfer binary get /root/test close exit
in exemple, its user@exemple.com, if its only user@ip there is a pb?
Reply with quote
-
martin◆
Site Admin
2008-08-05
Hello i have the same problem, when i lauch the script in console mod, i have «host does not exist» but if i write open in winscp console and my @ip of my server, it works
So do you use IP address in both cases or hostname in the first?
Reply with quote
-
Delphi
Guest
2008-08-27 10:25
In my case I had used batch files to start several sessions at once. This was no problem as long as I left them directly in the base folder.
c: cd ProgrammeWinSCP3 START WinSCP.exe "connection25" PING -n 2 127.0.0.1>nul # poor man's delay START WinSCP.exe "connection32"
Meanwhile this list had grown much too long so I moved many of the connections into project specific folders. I changed my batch accordingly
c: cd ProgrammeWinSCP3 START WinSCP.exe "folder/connection1" PING -n 2 127.0.0.1>nul # poor man's delay START WinSCP.exe "folder/connection2"
Well and now it says «Host does not exist» — but if I open them manually they work perfectly. Any idea what I am doing wrong?
Reply with quote
Advertisement
-
martin◆
Site Admin - Joined:
- 2002-12-10
- Posts:
- 38,466
- Location:
- Prague, Czechia
2008-08-29
Delphi wrote:
In my case I had used batch files to start several sessions at once. This was no problem as long as I left them directly in the base folder.
…
Thanks for your post. This issue has been added to tracker.
Reply with quote
-
Jimboberlin
Guest
2009-04-01 22:13
Hi — according to your tracker this bug has been resolved — I get the same error with this simple script:
Code
# Connect open root@87.230.6.132 # Change remote directory cd /srw/www/bulk_files/rails/down/app/ # Force binary mode transfer option transfer binary # update folder keepuptodate d:progphp_projectsdownapp /srw/www/bulk_files/rails/down/app/ # Disconnect close # Exit WinSCP exit
Output:
Searching for host... Host does not exist
When entering the same commands in the shell everything works like a charm!
Any Ideas?
Reply with quote
-
martin◆
Site Admin - Joined:
- 2002-12-10
- Posts:
- 38,466
- Location:
- Prague, Czechia
2009-04-03
Jimboberlin wrote:
Hi — according to your tracker this bug has been resolved
I do not see any relation to the referenced bug.
When entering the same commands in the shell everything works like a charm!
Any Ideas?
Please post a full log file showing the problem. Both log file from the shell and script.
Reply with quote
-
martin◆
Site Admin
2009-04-06
Reply with quote
Advertisement
-
Priyaranjan
Guest
2009-07-10 10:50
I am running python to initiate winscp to synchronize my folder with a central server. I had the same problem. When I run the python with a web page winscp returns error host doesn’t exist. But, when I run the code directly, it was working. So, after going through a lot of documentation, I thought of trying sftp://username:password@hostaddress and when tried this, it failed and the reason is it returned a hostkey to accept in the stdout. That means this session of winscp is running like a fresh connection to that host eventhough I have connected to that host before. So, I copied the host key in stdout used with -hostkey==»My Key» option at the end of open command and it worked. Now I am able to run a python code behind a webpage to synchronize my files. If at all this makes any sense to you, try it yourselves leave a feedback.
Reply with quote
-
Priyaranjan
Guest
2009-07-13 05:42
Sorry about the typo in the last post.
My commands are like following.
I use a bat file to initiate the commands
bat file code
@echo off winscp.com /script="C:runthis.txt"
runthis.txt code
option batch on option confirm off open sftp://user:password@host:port -hostkey="ssh-blah blah" synchronize remote -criteria='both' "C:Backuptest" "/www/cgi-bin/test" chmod 644 /www/cgi-bin/test/*.html chmod 775 /www/cgi-bin/test/*.py synchronize remote -criteria='both' "C:Backup" "/www/cgi-bin" chmod 644 /www/cgi-bin/*.html chmod 775 /www/cgi-bin/*.py synchronize remote -criteria='both' "C:js" "/www/htdocs/test/js/" exit
winscp.exe did not work for me from the webpage. winscp.com worked fine. Don’t know why.
Reply with quote
-
sridhar
Guest
2010-02-25 22:31
I am able to manually run my batch file to upload file but it fails when I use ssis process task. can you tell me what might be the cause?
Reply with quote
-
martin◆
Site Admin
2010-02-26
sridhar wrote:
I am able to manually run my batch file to upload file but it fails when I use ssis process task. can you tell me what might be the cause?
Please read FAQ. If that does not help, come back.
Reply with quote
Advertisement
- Guest
2010-02-26 18:38
I read that. I solved this problem by replacing script argument with command argument but now I am getting different problem.It uploads the file but failing with error «Assertion failied:random_active>=0». you mentioned that you fixed the bug in latest release. I installed latest version. I have the host key in INI file and ran command to read from INI file rather than registry.here is the command argument.
script= /command «option batch on» «open username:password@ftp.ftp.com» «optin transfer binary» «put xxx_DEV.csv» «close» «exit». If i run from command prompt I am not getting error. if i run it on ssis package I am getting this error. can you help me on this?
Reply with quote
-
martin◆
Site Admin - Joined:
- 2002-12-10
- Posts:
- 38,466
- Location:
- Prague, Czechia
2010-03-01
Anonymous wrote:
It uploads the file but failing with error «Assertion failied:random_active>=0». you mentioned that you fixed the bug in latest release. I installed latest version. I have the host key in INI file and ran command to read from INI file rather than registry.here is the command argument.
Thanks for your post. This bug is being tracked already.
Reply with quote
- Guest
2010-03-30 21:35
entering the command:
winscp /console script.tmp
instead of
winscp /console /script=script.tmp
will result in ‘Host not found’, I think new users sometimes just don’t see the ‘/script=’ part I know I didn’t.
Reply with quote
-
anoni
Guest
2010-05-29 10:15
you suck.. you did not answer their question. And the problem is true.
Reply with quote
Advertisement
-
collinj
Guest
2010-08-02 07:50
prikryl, you don’t why you even bother to look at post. From your input it is clear you do not have an idea what the problems are!
Reply with quote
-
collinj
Guest
2010-08-02 07:54
Sorry for the typo. I want to re-type this to make it clear.
prikryl, I don’t know why you even bother to reply to these posts. You obviously don’t have a clue!
Reply with quote
-
Caipre
Guest
2010-08-08 15:40
I was having this exact issue — entering the hostname, login, and password from the CLI worked fine, but running a batch script of the same information failed with the «Host does not exist» message. The log indicated that the program had confused the /script=»…» parameter as the hostname.
I noticed the version of WinSCP was out of date, so I updated.
Works as expected now.
Reply with quote
-
guest2011
Guest
2011-05-01 22:47
This problem exists when you use batch script to execute COM program, like this:
(winscp.cmd)
d:myappsWinSCPWinSCP.com %1 %2 %3 %4 %5 %6 %7 %8 %9
and in the main batch:
winscp /script=»%FTPSCRIPT%»
When you change the main batch to:
d:myappsWinSCPWinSCP.com /script=»%FTPSCRIPT%»
everything works OK
Looks like COM program reads command line arguments in non-standard way.
Reply with quote
Advertisement
-
martin◆
Site Admin - Joined:
- 2002-12-10
- Posts:
- 38,466
- Location:
- Prague, Czechia
2011-05-02
guest2011 wrote:
and in the main batch:
winscp /script=»%FTPSCRIPT%»When you change the main batch to:
d:myappsWinSCPWinSCP.com /script=»%FTPSCRIPT%»
What is value of FTPSCRIPT?
Reply with quote
- Guest
2011-05-05 19:52
FTPSCRIPT doesn’t have spaces or special characters, it is equal to:
C:UsersmyuserAppDataLocalTempmyscr.ftp
where «myuser» is current user’s profile name and «myscr.ftp» is script file name.
Reply with quote
-
martin◆
Site Admin - Joined:
- 2002-12-10
- Posts:
- 38,466
- Location:
- Prague, Czechia
2011-05-09
Anonymous wrote:
FTPSCRIPT doesn’t have spaces or special characters, it is equal to:
C:UsersmyuserAppDataLocalTempmyscr.ftp
where «myuser» is current user’s profile name and «myscr.ftp» is script file name.
Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.
You will find my address (if you log in) in my forum profile.
Reply with quote
- Guest
2011-05-15 21:00
I found an error — it was inside my batch, the call to *.cmd should be:
winscp «/script=%FTPSCRIPT%»
This is because Windows «eats» ‘=’ character inside parameters, if not enclosed by quotation marks.
Reply with quote
Advertisement
-
caio
Guest
2011-05-19 03:48
Well, i’ve just installed winscp on my machine and wants to copy files to a remote backup folder…
when i run winscp.com and then use the command open ftp://user:pass@IP:port, it connects fine…but if i run one script with the command «open ftp://user:pass@IP:port» inside (without the quotes), it keeps saying Host does not exist…is there any way to debug this error, so i can find why it keeps happening?i think it’s some problem on parsing the string in the script file, but can’t be sure, it’s just a guess…
well, any help would be appreciated…thanks in advance
Reply with quote
-
martin◆
Site Admin - Joined:
- 2002-12-10
- Posts:
- 38,466
- Location:
- Prague, Czechia
2011-05-19
caio wrote:
Well, i’ve just installed winscp on my machine and wants to copy files to a remote backup folder…
when i run winscp.com and then use the command open ftp://user:pass@IP:port, it connects fine…but if i run one script with the command «open ftp://user:pass@IP:port» inside (without the quotes), it keeps saying Host does not exist…is there any way to debug this error, so i can find why it keeps happening?i think it’s some problem on parsing the string in the script file, but can’t be sure, it’s just a guess…
well, any help would be appreciated…thanks in advance
Just enable logging to see how WinSCP parsed the URL.
Reply with quote
-
caio
Guest
2011-05-19 18:38
Hey, it worked now, thanks…
Reply with quote
- dmartin
- Joined:
- 2011-05-25
- Posts:
- 1
- Location:
- Melbourne Australia
2011-05-25 11:35
Hi Can someone please help me I am just about had enough with Winscp and trying to connect my iphone. I have gone through all of the forums and try everything and have no luck?
My Specs are as follows;
1. Windows 7
2. Iphone 4 — IOS 4.3.3 Jailbroken with Cydia installed
3. Openssh installed and working fine
4. SBsettings — ssh toggle turned on
5. when I try to connect to my iphone I get «network error — connection refused»
Trust I have tried everything as per lot of those forum installing Ipohne tunnel programs and still have no luck. I would really really appreciate any help from someone.
Thanks you.
Reply with quote
Advertisement
-
BryWalt
Guest
2012-05-14 08:03
martin wrote:
caio wrote:
Well, i’ve just installed winscp on my machine and wants to copy files to a remote backup folder…
when i run winscp.com and then use the command open ftp://user:pass@IP:port, it connects fine…but if i run one script with the command «open ftp://user:pass@IP:port» inside (without the quotes), it keeps saying Host does not exist…is there any way to debug this error, so i can find why it keeps happening?i think it’s some problem on parsing the string in the script file, but can’t be sure, it’s just a guess…
well, any help would be appreciated…thanks in advanceJust enable logging to see how WinSCP parsed the URL.
Prikryl, I wish you could offer more help! For example, your answer above could go much further if you explained how to ENABLE LOGGING! Geez!
Reply with quote
-
Jimmy S
Guest
2013-08-30 17:02
rickyj wrote:
I receive the «Host does not exist» message when trying to use the /script=filename option. However, when I use manually enter the same information that is in the file using winscp interactively, I can login to the server without any problems. Why??????
I could fix it, I don’t know if it is going to work in your case, adding the path of the winscp into the script. For example:
This is what I had with «Host does not exist»
winscp.com GyT /script=gyt.txt
then I changed it to this and it worked(basically I pointed out the path of winscp command and the script):
c:progra~2winscpwinscp.com GyT /script=c:ftptransgyt.txt
Cheers!
Reply with quote
-
martin◆
Site Admin - Joined:
- 2002-12-10
- Posts:
- 38,466
- Location:
- Prague, Czechia
2013-09-03
Jimmy S wrote:
I could fix it, I don’t know if it is going to work in your case, adding the path of the winscp into the script. For example:
This is what I had with «Host does not exist»
winscp.com GyT /script=gyt.txtthen I changed it to this and it worked(basically I pointed out the path of winscp command and the script):
c:progra~2winscpwinscp.com GyT /script=c:ftptransgyt.txt
1) You should not open site for scripting using command-line parameter. Use open
command from the script instead.
2) Path to a script file cannot make a difference for this.
3) Path to a winscp.com
makes a difference, when you are using an INI file stored in c:progra~2winscp
and your PATH
actually points to a different instance of winscp.com
(with different configuration) that does not know the «GyT» site.
The best to do is to avoid depending on a configuration:
https://winscp.net/eng/docs/scripting#configuration
Reply with quote
-
ravi3300
Guest
2017-11-30 04:56
hi..
when i trying to open any file from ftp site then got error Host «C» does not exist.
winscp error pls help
Reply with quote
Advertisement
-
martin◆
Site Admin - Joined:
- 2002-12-10
- Posts:
- 38,466
- Location:
- Prague, Czechia
2017-11-30
ravi3300 wrote:
hi..
when i trying to open any file from ftp site then got error Host «C» does not exist.
winscp error pls help
Please start a new thread for your new problem and include a complete session log file.
Reply with quote
- millerintllc
- Joined:
- 2018-06-17
- Posts:
- 2
2018-06-17 01:29
10 years later and I have the same exact problem…
Reply with quote
-
martin◆
Site Admin - Joined:
- 2002-12-10
- Posts:
- 38,466
- Location:
- Prague, Czechia
2018-06-19
millerintllc wrote:
10 years later and I have the same exact problem…
And I have same exact answer:
Please start a new thread for your new problem and include a complete session log file.
Reply with quote
-
NoUsername
Guest
2020-11-24 10:47
Hello. I encountered this problem (with powershell) and this thread. In my case, the problem was an invalid character.
Error: Exception calling «Open» with «1» argument(s): «Host «<FQDN>» does not exist.»
The hostname property is set with this regexp:
$sftpLine -match '(^sftp -o Port=)(?<port>[0-9]+) (?<username>.*)@(?<hostname>.*)$'
$sftpHostname=$matches.hostname
Problem: the regexp output includes the carriage return character (in powershell: «`r»).
$sftpHostname.Replace("`r",'') -eq $sftpHostname False
Note that the powershell error does not show the carriage return character anywhere. I found it by looking at the session output. $session.Output:
... winscp> open "sftp://username:***@hostname%0D:2222" -hostkey="ssh-rsa 2048 xx:xx:xx.." -timeout=15 ...
Look at the hostname, it ends with «%0D». That is not good…
The fix? Replace the invalid character with nothing:
$sftpHostname=$matches.hostname.Replace("`r",'')
Reply with quote
Advertisement
- Reply to topic
- Log in
You can post new topics in this forum