2010-12-10 20:14:56     Troule getting rcp, rsh to work

Document created by Aaronwu Employee on Aug 25, 2013
Version 1Show Document
  • View in full screen mode

2010-12-10 20:14:56     Troule getting rcp, rsh to work

Jay Ku (UNITED STATES)

Message: 96637   

 

I'm trying to rsh and rcp to my target but I keep getting "ssh: connect to host 192.168.1.111 port 22: Connection refused" (this is from my linux development machine):

 

rcp vtest root@192.168.1.111:/usr/bin

ssh: connect to host 192.168.1.111 port 22: Connection refused

lost connection

 

I'm pretty sure I have the networking working on my target - I can telnet, ftp and ping to/from it.  I must be missing something simple, but I can't figure it out.  Here's some info from my target:

 

root:/> ifconfig

eth0      Link encap:Ethernet  HWaddr 92:84:92:2B:29:14

          inet addr:192.168.1.111  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:118 errors:0 dropped:0 overruns:0 frame:0

          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:36655 (35.7 KiB)  TX bytes:486 (486.0 B)

 

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

 

root:/> ps | grep inet

  169 root       463 S    /sbin/inetd

  190 root       717 S    grep inet

root:/> more /etc/inetd.conf

shell   stream tcp nowait root /bin/rshd

ftp     stream tcp nowait root /bin/ftpd -l

telnet  stream tcp nowait root /bin/telnetd

root:/> ls -l /bin/rshd

-rwxr-xr-x    1 root     root         18120 Oct 11  2010 /bin/rshd

root:/> uname -r

2.6.34.7-ADI-2010R1-pre-svn9156

root:/>

 

 

QuoteReplyEditDelete

 

 

2010-12-10 22:21:19     Re: Troule getting rcp, rsh to work

Robert Cochran (UNITED STATES)

Message: 96638   

 

Jay,

 

Maybe some of these tidbits will help:

 

i) On my Linux development machine (Ubuntu), rcp is actually a soft link to scp, which uses ssh for data transfer.

 

ii) I have never tried to use rcp on blackfin, but I use ssh all the time.  I use the dropbear server on Blackfin.  It seems to build and work without any problems.  I'm sure you already realize there is documentation in the blackfin wiki for both rcp & ssh.

 

iii) My guess is your blackfin board isn't listening on port 22 (socket is closed).  Do you know about wireshark, the packet sniffer?  It's great for seeing what packets are flying across your network.  I would expect that your host is trying to open a socket, but the blackfin keeps sending back resets.

 

Bob

QuoteReplyEditDelete

 

 

2010-12-11 00:46:49     Re: Troule getting rcp, rsh to work

Jay Ku (UNITED STATES)

Message: 96639   

 

Bob,

 

Thanks for the tips.  I'm also using Ubuntu, and my rcp is also aliased to scp.  It says right in the error message that ssh can't connect, which is because I wasn't running sshd on my board.  Duh.  I needed to enable 'dropbear' (an sshd-replacement) under Network Applications in menuconfig (there's also an option to build sshd, but when I checked this the build failed for some reason).  With dropbear in there rcp and rsh work just fine (the ssh line is automatically added to /etc/inetd.conf). 

 

- Jay

QuoteReplyEditDelete

 

 

2010-12-11 02:06:05     Re: Troule getting rcp, rsh to work

Mike Frysinger (UNITED STATES)

Message: 96640   

 

yes, but you arent actually using rcp/rsh then.  you're using scp/ssh.  i dont know why ubuntu aliases rsh/rcp to ssh clients ... that's kind of dumb.

 

i imagine there is an actual rsh client in ubuntu you could install.

QuoteReplyEditDelete

 

 

2010-12-11 13:22:27     Re: Troule getting rcp, rsh to work

Jay Ku (UNITED STATES)

Message: 96645   

 

Right - I should have been more clear about that in my post.  Ubuntu supports actual rsh/rcp via its rsh-client package.

QuoteReplyEditDelete

Attachments

    Outcomes