Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-16-2016, 11:43 PM
|
#1
|
Member
Registered: Dec 2011
Posts: 91
Rep:
|
AIX to linux migration
Hi,
recently we have migrated our current AIX server to Linux, we have lot of shell script, few of them are FTP scripts.
we have copied the complete AIX file system to linux 7.2 as it is.
could you please highlight what are the things we need to look into it .
in AIX we are using .netrc to store all FTP destination details servername,userid, password ...etc, will .netrc work in linux environment , if not what is the replacement of this file.
also please highlight the areas which we really need to look in terms after migration , currently we have just migrated our TEST box.
Thank you in advance.
|
|
|
11-17-2016, 05:52 AM
|
#2
|
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039
Rep:
|
Wow
When you say "we have copied the complete AIX file system...as it is"
Please confirm you do not mean that you have copied /bin /sbin /etc /dev
|
|
|
11-17-2016, 06:41 AM
|
#3
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,004
|
AIX was NOTHING like Linux until version 5L, and then really only if you added the open source extensions. IT is more similar now (if you ignore certain features, and all of the lpar extensions), but copying over a whole file system is -- unusual. Best of luck.
Your ftp setup may need some 'tweaking', but should basically work as before. Some of the ftp options will differ, and there are many more options. You have some reading to do, and trail and error testing and verification ahead. It should be fun.
If your traffic goes beyond your internal network, be aware that the rest of the world has moved on from ftp more than a decade ago, and sftp is preferred. (I aged myself, it is now more like two decades ago.) The protocol is more secure (all traffic is encrypted, including the initial authentication : ftp is in the clear and can be captured and compromised easily), but also the automation tools are far more powerful. Check into putty-tools (psftp and pscp), lftp, and OpenSSH (scp and sftp) for interesting detail.
|
|
|
11-17-2016, 08:47 AM
|
#4
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep:
|
Yes .netrc works in Linux. What is Linux 7.2? The current stable version of Linux is 4.8.8.
|
|
|
11-17-2016, 10:44 AM
|
#5
|
Member
Registered: Dec 2011
Posts: 91
Original Poster
Rep:
|
@Disillusionist : No, we have copied all applciation file system which includes data files,shell scripts, application files with soft link and hard links.
@wpeckham seems FTP has not installed yet, will do it.
:/sbin> ftp
bash: ftp: command not found...
could you please confirm .netrc file if copy directly from AIX to work.
@Emerson its redhat linux version 7.2 , also could you please confirm if i place direct AIX- .netrc to Redhat linux host will it work.
|
|
|
11-17-2016, 10:53 AM
|
#6
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep:
|
I'd recommend you compare man netrc for both systems. I do not expect there be any differences, but it is better to check. It is Red Hat Enterprise Linux (RHEL), Red Hat 7.2 was released in 2001 and is outdated, hope you are not using it?
|
|
|
11-17-2016, 11:06 AM
|
#7
|
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039
Rep:
|
Depending on what you chose at install time, along with what utilities your various scripts require you may find yourself getting very familiar with "yum install ..."
Good luck with your project it looks interesting if likely to be frustrating at times
Last edited by Disillusionist; 11-17-2016 at 11:09 AM.
|
|
|
11-17-2016, 10:20 PM
|
#8
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415
|
Actually, RH 7.2 https://en.wikipedia.org/wiki/Red_Hat_Linux is indeed that old, but it is NOT the same as RHEL 7.2 https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux (note the 'E' there), which is the latest/greatest (paid-for) from Redhat .
As per previous comments, check the man pages etc for .netrc, but these days even on an (allegedly) secure internal network, you should be using either scp/sftp (part of the openssh pkg) or FTPS ie ftp+ssl - see vsftpd which is probably in the RHEL repos.
(4.8.8 is a kernel version & irrelevant here)
Last edited by chrism01; 11-17-2016 at 10:40 PM.
|
|
|
11-18-2016, 06:58 AM
|
#9
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,004
|
Quote:
Originally Posted by chrism01
Actually, RH 7.2 https://en.wikipedia.org/wiki/Red_Hat_Linux is indeed that old, but it is NOT the same as RHEL 7.2 https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux (note the 'E' there), which is the latest/greatest (paid-for) from Redhat .
As per previous comments, check the man pages etc for .netrc, but these days even on an (allegedly) secure internal network, you should be using either scp/sftp (part of the openssh pkg) or FTPS ie ftp+ssl - see vsftpd which is probably in the RHEL repos.
(4.8.8 is a kernel version & irrelevant here)
|
Not irrelevant at all. While there are distributions with a number like 7.2 (Red Hat Enterprise Linux 7.2 for example) there is no product or package called 'linux 7.2' and we need to know what the OP really has and means to make directed answers based upon a specific distribution.
To the point: in all of the distributions I have encountered where FTP was still supported, the same basic ftp features applied. A few have security features that MAY be turned on that change that picture. There may be minor differences, but in general your answer should be "yes it works the same" if you turn off that security.
There are specific versions of some distributions that actively disable those features and detect and remove those files because the violate nearly every modern security standard. I manage about 200 servers based upon RHEL and CentOS, but none of them need or support the system you are using because our own security standards and ID software rejects it and OpenSSH offers better and more secure tools to accomplish the same goals. I do not believe the RHEL software rejects them, but I must admit I have not tested that since RHEL4 was pretty new.
I believe I and Emerson have already indicated that this should work, but I hope this makes things more clear.
Your best and most definitive answer will be the answer YOU provide after testing.
Please give it a try, and get back to use with the result.
(And the command should be "sudo yum install ftp" or as root "yum install ftp" to get ftp if you have a RHEL system. You may want to use more powerful and secure tools as previously mentioned.)
|
|
|
11-23-2016, 11:33 PM
|
#10
|
Member
Registered: Dec 2011
Posts: 91
Original Poster
Rep:
|
AIX- .netrc NOT working in linux
Hi,
I got an issue in .netrc , please find below SFTP script and .netrc file .
getting error as below, please assist me to rectify, thanks.
Quote:
sftp> $ imuploaddata test1.DAT /home/test/
Invalid command.
|
this is my FTP script
Code:
abc@systalk:~/test> cat imftp.sh
#!/bin/sh
filetoftp="$1"
filepath="$2"
echo "\$ imuploaddata $filetoftp $filepath" | sftp 10.251.21.157
my .netrc micro as below.
Code:
abc@systalk:~/test> cat ../.netrc
# machine MVS2.MAS.NET login TS19610 password ihsan31
machine s_kulsznas1.kulsz.usr.mas.net login kulsz/\graflite password grafl1te
machine 10.251.21.157 login sysftp password imsw19tp
macdef imupload1
cd /PROJECT_D/01_source_layer/01_raw_source_files/CPD
lcd $2
prompt off
ascii
verbose on
put $1
quit
macdef imuploaddata
cd /PROJECT_B/01_source_layer/01_raw_source_files/CPD
lcd $2
prompt off
ascii
verbose on
put $1
quit
|
|
|
11-24-2016, 11:36 AM
|
#11
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,004
|
Ok, there is a bit of a misunderstanding here. Anything that ftp can do with the .netrc file sftp can do, but it works a different way. Normally sftp does NOT use the .netrc file, and it is considered insecure. I recommend reading the man pages for sftp and ssh. Look for detail on the config file that goes in the .ssh folder under your account home. You may also want to read up on ssh-keygen and ssh-copy-id. Using keys is more secure than using passwords, and makes automated logon easy as long as you attend to the file and folder permissions.
|
|
|
All times are GMT -5. The time now is 08:39 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|