# question about tivoftpd



## Beau_in_Austin (Aug 6, 2006)

Have any of you ever telnet'ed to your Tivo's IP with the ftp server's port number appended, ie: telnet 192.168.1.126:21 ? Like that? If not, would you try and tell me if you get a login prompt?

Thanks.

[Beaus-Computer:~] beau% telnet 192.168.1.126:21
192.168.1.126:21: No address associated with nodename
[Beaus-Computer:~] beau% telnet 192.168.1.126
Trying 192.168.1.126...
Connected to 192.168.1.126.
Escape character is '^]'.
bash-2.02#


----------



## JamieP (Aug 3, 2004)

Beau_in_Austin said:


> Have any of you ever telnet'ed to your Tivo's IP with the ftp server's port number appended, ie: telnet 192.168.1.126:21 ?


Use a space, not a colon, between the ip and the port. For example:

```
% telnet 192.168.1.108 21
Trying 192.168.1.108...
Connected to tivo.home.lan (192.168.1.108).
Escape character is '^]'.
220 You are in TiVo Mode.  No login necessary - hit enter at the prompts
```


----------



## Beau_in_Austin (Aug 6, 2006)

Thanks, Jamie.

The apparently fried/overworked support guy at PTVupgrade wrote me in response to a request for support that what you just did can not happen. I was told you can not telnet to the ftp port of your hack'ed Tivo and expect to see a prompt.

When I try it the way you're saying, the login just hangs..

[Beaus-Computer:~] beau% telnet 192.168.1.126 21
Trying 192.168.1.126...
Connected to 192.168.1.126.
Escape character is '^]'.

3 minutes later, still hanging.


----------



## Gunnyman (Jul 10, 2003)

I telneted to port 21 and indeed saw an ftp prompt
you have either got
1) firewall issue
2) a bad copy of tivoftpd
3) the service isn't actually running
what happens if you telnet in and start tivoftpd?


----------



## tivoupgrade (Sep 27, 2000)

or: 

4) a session that is already open.

Try killing tivoftpd and then restarting it again, then attempting a connection...


----------



## JamieP (Aug 3, 2004)

tivoupgrade said:


> or:
> 
> 4) a session that is already open.
> 
> Try killing tivoftpd and then restarting it again, then attempting a connection...


The tivoftpd I'm using (I believe the standard one everyone else uses too) supports multiple concurrent ftp sessions.

BTW, *netstat -l* run on the tivo (assuming you have telnet or serial port access) is a good way to list all listening server sockets.

You can also try to connect to it from the tivo itself. *telnet localhost 21*.


----------



## Beau_in_Austin (Aug 6, 2006)

Gunnyman said:


> I telneted to port 21 and indeed saw an ftp prompt
> you have either got
> 1) firewall issue
> 2) a bad copy of tivoftpd
> ...


I've tried it with all firewalls off, though please note, I've ftp'ed terabytes of data over the years with the firewalls on, as they are now.

If PVTupgrade installed a bad copy of tivoftpd? Is there a way to tell?

It is running; I've tried killing and restarting it, though I'm guessing that 'persist' directory may have some say in the matter.

Thiis is all very new to me, but from what I've read, the PTVupgrade disk didn't follow the same directory schemes that a lot of the Tivo hack chat sites suggest; not that I knoow if this has any bearing.


----------



## Gunnyman (Jul 10, 2003)

the location of the program has absolutely no effect one way or the other.
if ftp is physically running then there is something in either the tivo firewall (netfilter) or your router or computer
one other thing and this may sound odd, do you use VPN software?


----------



## Beau_in_Austin (Aug 6, 2006)

I just killed and restarted tivoftpd again; this time, something new happened.

The response, when I telnet'ed to port 21, was very fast. you'll see the same error every time I hit 'enter'

[Beaus-Computer:~] beau% telnet 192.168.1.126 21
Trying 192.168.1.126...
Connected to 192.168.1.126.
Escape character is '^]'.
220 You are in TiVo Mode. 220 Login isn't necessary. 220 Please hit ENTER at the login/password prompts.

500 Syntax error, command unrecognized.

500 Syntax error, command unrecognized.

500 Syntax error, command unrecognized.

500 Syntax error, command unrecognized.


----------



## Gunnyman (Jul 10, 2003)

ok so tivoftp is working
does it quit on you at that point?


----------



## Beau_in_Austin (Aug 6, 2006)

no VPN software, off to look for netfilter on the Tivo

Thanks


----------



## Beau_in_Austin (Aug 6, 2006)

Gunnyman said:


> ok so tivoftp is working
> does it quit on you at that point?


It never gets past

500 Syntax error, command unrecognized.

I keep hitting 'enter', and keep getting, '500 Syntax error, command unrecognized.'


----------



## JamieP (Aug 3, 2004)

Beau_in_Austin said:


> I just killed and restarted tivoftpd again; this time, something new happened.
> 
> The response, when I telnet'ed to port 21, was very fast. you'll see the same error every time I hit 'enter'
> 
> ...


This is normal behavior. Your tivoftpd is working now. You'll get "command unrecognized" unless you are typing raw ftp protocol commands into your telnet window.

Try connecting with a real ftp client now.


----------



## Gunnyman (Jul 10, 2003)

are you on a mac? I can't remember anymore
if so try telnet -K


----------



## MungoJerrie (Mar 30, 2006)

Hooray you're connected, getting a response; except you're not going to get a shell. The FTP daemon is expecting FTP commands. Telnet (better yet netcat) is typically used by hackers to interrogate the FTP daemon to see what version is listening; other than that, you're not going to get much out of it. Now try using an FTP client!


----------



## Beau_in_Austin (Aug 6, 2006)

THANK YOU! Thank you all!



MungoJerrie said:


> Hooray you're connected, getting a response; except you're not going to get a shell. The FTP daemon is expecting FTP commands. Telnet (better yet netcat) is typically used by hackers to interrogate the FTP daemon to see what version is listening; other than that, you're not going to get much out of it. Now try using an FTP client!


This is the weirdest darn thing. I killed and restarted tivoftpd a third time (the charm!) and using the command line ftp client (I included the port because it didn't work w/o it)

Maybe if I had included the port all along? Never had to do that before.

[Beaus-Computer:~] beaubaha% ftp 192.168.1.126 21
Connected to 192.168.1.126.
220 You are in TiVo Mode. 220 Login isn't necessary. 220 Please hit ENTER at the login/password prompts. 
Name (192.168.1.126:beau): 
331 No Auth required for TiVo Mode.
Password:
230 Running in TiVo Mode.
Remote system type is UNIX.
ftp>

THANK YOU AGAIN!


----------



## Beau_in_Austin (Aug 6, 2006)

"In the Summer time, when the weather is high"

I've found two copies of tivoftpd on the partition. The one started in the rc.sysinit file is /sbin/tivoftpd

That's the one I killed. The one I started, the copy of tivoftpd that apparently works, is in /ptvupgrade/bin

The two files have different dates. 

The /sbin one looks like this - 100755 45016 Jan 23 12:10:14 tivoftpd

The /ptvupgrade/bin one looks like this - 100755 45016 Apr 01 17:44:41 tivoftpd


----------

