Monday, February 28, 2011

OEL 5.6: Enable Telnet and FTP

Since I "broke" my last installation and couldn't easily get the latest and greatest Oracle Enterprise Linux running correctly (1, forgot the Desktop components, 2, I can't remember), I went back to OEL 5.6 (Carthage).

I have about 100 files that I need to move over to that server and with my issues with VirtualBox Shared folders in the past, I figured I would just FTP them. Well, FTP isn't on by default...and since this is a sandbox, I don't much care about "real" authorization.

FTP
For FTP, go into /etc/xinited.d/ and open up gssftp
[root@medicaid xinetd.d]# vi gssftp 

# default: off
# description: The kerberized FTP server accepts FTP connections \
# that can be authenticated with Kerberos 5.
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/ftpd
server_args = -l -a
log_on_failure += USERID
disable = yes
}
By default, it is disabled.

To enable it, change disable = yes to disable = no. That's not it though. If you try to ftp in, you'll see this:
oraclenerd@oraclenerd:/usr/bin$ ftp medicaid
Connected to medicaid.
220 medicaid FTP server (Version 5.60) ready.
Name (medicaid:oraclenerd): oracle
530 Must perform authentication before identifying USER.
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221 Goodbye.
With the help of this discussion, I removed the server arguments. From what I can tell, those are there for Kerberos authentication, which I don't need or care about. Your final file should look like this:
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/ftpd
server_args =
log_on_failure += USERID
disable = no
}
Then you can do this:
oraclenerd@oraclenerd:/usr/bin$ ftp medicaid
Connected to medicaid.
220 medicaid FTP server (Version 5.60) ready.
Name (medicaid:oraclenerd): oracle
331 Password required for oracle.
Password:
230 User oracle logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221 Goodbye.
Telnet
The process is nearly identical for telnet, here's the config file:
service ftp
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/ftpd
server_args =
log_on_failure += USERID
disable = yes
}
For telnet, just change disabled=yes to disabled=no.
oraclenerd@oraclenerd:/usr/bin$ telnet medicaid
Trying 192.168.1.6...
Connected to medicaid.
Escape character is '^]'.

medicaid (Linux release 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010) (2)

login: oracle
Password:
Last login: Mon Feb 28 14:38:06 on :0
[oracle@medicaid ~]$
Next time, I won't have to remember, or I'll have blown away so many instances that I'll just remember, either way, this is my record.

Update
So, twitter gave me the following after I posted the link to this post:



My answer, How in the f would I know something like this? I have no fancy training. :)

So, now I'm using ssh and sftp. Much easier, and it just seems to work. No configuration necessary. Yeah for Mr. Norris.

5 comments:

Gary Myers said...

Why not go with SSH and you have sftp thrown in for free ?

oraclenerd said...

probably because i don't know any better. :)

i'll have to look into it.

rnm1978 said...

hey chet

check out scp too

Bradd Piontek said...

and if you are on windows


putty is your friend, as is WinScp (both freeware)

telnet and ftp. Man, I was ready to party like its 1999

neerajvasudeva said...

nice blog.

small typo is there in dir name where gssftp resides. it should be /etc/xinetd.d/