aspose file tools*
The moose likes Linux / UNIX and the fly likes Host not found using pscp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Host not found using pscp" Watch "Host not found using pscp" New topic
Author

Host not found using pscp

Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
I get the message that "ssh_init: Host does not exist", but I can ping the host. This is a local wireless network. The server is running Ubuntu; the client is an XP box. what could I be missing?

Thanks.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

Mary, let's use the forum, not email.
Is the server running sshd? Can you use ssh/putty to log in to the server?


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
I'm happy to use the forum and not email, Joe; but no one was reponding to the forum post.
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
C:\DirectoryStructure>echo %PATH%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;c rogram Files\Putty

C:\DirectoryStructure>cd c:\Program Files\Putty

C:\Program Files\Putty>dir
Volume in drive C has no label.
Volume Serial Number is 0445-3F03

Directory of C:\Program Files\Putty

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 Files\Putty>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 Files\Putty>pscp C:\DirectoryStructure\Logon.gif betty@penguin:testSCP
ssh_init: Host does not exist

C:\Program Files\Putty>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
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

Originally posted by Mary Taylor:
I'm happy to use the forum and not email, Joe; but no one was reponding to the forum post.


Remember, Patience is a virtue. Myself and everyone else here are volunteers, helping people in their spare time. I've never used PSCP, so I'm starting with basics. You didn't answer my questions:
Is the server running sshd?
Can you use ssh/putty to log in?
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
Yes, I can login to the server using putty. I can ping the server. I just can't pscp to the server.
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
I have never used pscp either.

Can you tell us or better show us what happens when you try a pscp command?

Have you tried that -scp option?

Guy
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
Yes, patience is a virtue; I believe our posts overlapped as I was answering your questions as fast as I could.
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
Result when using "-scp"

C:\Program Files\Putty>pscp -scp C:\xxx\xxx\Logon.gif betty@penguin:testSCP
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
[ November 28, 2007: Message edited by: Mary Taylor ]
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
Result of issuing "netstat -tulpn" ; I did substitute zeros for the IP address of the server when it was included in the results.

(No info could be read for "-p": geteuid()=1001 but you should be root.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -
tcp 0 0 000.000.0.0:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN -
tcp6 0 0 :::8010 :::* LISTEN -
tcp6 0 0 :::8180 :::* LISTEN -
tcp6 0 0 :::53 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 ::1:953 :::* LISTEN -
udp 0 0 0.0.0.0:32768 0.0.0.0:* -
udp 0 0 0.0.0.0:32770 0.0.0.0:* -
udp 0 0 192.168.2.2:137 0.0.0.0:* -
udp 0 0 0.0.0.0:137 0.0.0.0:* -
udp 0 0 000.000.0.0:138 0.0.0.0:* -
udp 0 0 0.0.0.0:138 0.0.0.0:* -
udp 0 0 000.000.0.0:53 0.0.0.0:* -
udp 0 0 127.0.0.1:53 0.0.0.0:* -
udp 0 0 0.0.0.0:67 0.0.0.0:* -
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
udp6 0 0 :::32769 :::* -
udp6 0 0 :::53 :::*
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

I think you have the command wrong. You are putting the file name where the host string should go:

PSCP Documentation
[ November 29, 2007: Message edited by: Joe Ess ]
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
I don't see that . Please explain.
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
C:\Program Files\Putty>pscp -scp user@penguin:C:\xxx\xxx\Logon.gif .
ssh_init: Host does not exist
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

I apologize. I didn't understand that the command line varies depending on if you are uploading or downloading:

Like I said, I've never used this program.
Have you tried PSFTP?
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
No, I have not tried any of these actually. The goal is to copy a new jar file now and then from my laptop to the server for adding or updating functionality in an application I'm creating. So the direction desired is XP to Ubuntu.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

PSFTP is one of the putty utilities. If you don't have it already, download it and give it a try. I'm at a loss to explain why you can SSH to your Ubuntu box but can't use pscp. They should be using the same protocol (pscp uses sftp by default).
[ November 29, 2007: Message edited by: Joe Ess ]
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
I will see if I have PSFTP tonight although why it would work and pscp doens't ... I don't understand. Did I get the command correct the last time then? I had noticed pscp used sftp.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

Why does ping resolve your penguin box to "penguin.betty"?


Do you have a "betty" domain set up? The outlook from ping sure looks like it. Try qualifying the host name in the pscp command:

Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
I don't know what you mean by qualifying the host name in the pscp command. Been trying to delete all identifying information, messed up. Can't see where all this personal information is relevant to other posters. Yes I have that domain set up. I was afraid I'd put too much information in these posts eventually. I'm not clever enough to lock everything down without some help and a lot of time I don't have right now. That's why I would have prefered to resolve this off line since it is easy to provide too much information about a networking problem.

[ November 29, 2007: Message edited by: Mary Taylor ]
[ November 29, 2007: Message edited by: Mary Taylor ]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

I gave you the command with the qualified host name above:

That is, if that is how your domain is set up. Without knowing the details we're just flying blind.
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
I have a "betty" user name; not sure what kind of domain you are speaking of.
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
Yes, I have the betty domain so I don't have to type the IP address
Mary Taylor
Ranch Hand

Joined: Sep 11, 2000
Posts: 319
C:\Program Files\Putty>pscp -scp C:\xxx\xxx\Logon.gif betty@penguin.betty:testSCP
ssh_init: Host does not exist
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Originally posted by Mary Taylor:
Yes, I can login to the server using putty. I can ping the server. I just can't pscp to the server.


Can you use ssh?
Then you may use stdin to send something to ssh, give ssh a command, login, ane read remote what you just sent.
This worked for me:


Well - you don't need tar, so cat would work too, woulnd't it?

If you don't have cat at the start, use type.


http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Host not found using pscp
 
Similar Threads
Marcus Green mock exams- not available
SQL Server 2005 Connection using SQL Explorer 3.5 in Eclipse
internal or external request.
jemmy automation
Different webapps on same instance of tomcat on different ports