I need to get IP address from linux server.
There are many script to do this, but no one is perfect.
They just grab eth0 or eth1 from ifconfig, and this may, may not be correct.
You may have several IF configured, but only one is default GW
Here is how I would like the process to be.
1. What is the default gateway?
This can be found using route -n and look at flags UG
2. Look at ifconfig and select the IP that correspond to default gateway within subnetmask.
This would give correct IP and ifname if you need it.
But there is but.
One one virtual server it may looks like this
No default gateway, and SM 255.255.255.255
This is typical on VPN tunnels etc.
Above is a search string I tried on Google that produced lots of hits but not much in the way of clues. And I wasn't looking for clues.
So I decided, for the first time, to ask the question here. What are the correct permissions for the .bash_aliases file?
iwrong (1 Reply)
Hi,
I am a newbie and has been given a task to connect to a windows server from a linux server (using putty of course; for file transfer) that too passwordless.
Searching through google I found "ssh-keygen" but this also couldn't work because as I tried ssh <username>@<windowsServerIP>, it says... (5 Replies)
Hi my name is Manju.
->I have configure the two way authentication on my linux server.
->Now I am able to apply two way authenticator on particuler user.
->Now I want to map this linux server to my AD server.
->Kindly tell me how to map AD(Active Directory) with this linux server.
... (0 Replies)
Hi my name is Manju.
->I have configure the two way authentication on my linux server.
->Now I am able to apply two way authenticator on particuler user.
->Now I want to map this linux server to my AD server.
->Kindly tell me how to map AD(Active Directory) with this linux server.
... (2 Replies)
Hi All,
I am generating report in a Linux server and once the report is generated the report(.txt file) needs to be automatically saved in a Windows servers.
So i am looking for a script to transfer the file automatically from Linux server to Windows server?
Please advise.
Thanks... (3 Replies)
I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd"
i am trying in this manner "
ssh username@servername "cd... (5 Replies)
We would be migrating unix solaries to Linux redhat.
Basically source is unix and target is linux.
i would like to copy entire file system unix/source/* to target linux/souce/*
but target linux has only folder setup so what ever files copied need to be placed in the linux server with same... (8 Replies)
Hi,
Please could someone advise I'm trying to use winscp from a Window server 2008 R2, but i need to add the authentication key to access the linux rh 5.4 servers ?
What is the best way of approaching this ?
If there are any web links that could help me do this, that would be good.
... (1 Reply)
Hi, we have a server which when we check time it has different time for different user. When we're using root user, the time is correct but when we login as individual user the time is delayed 1 hour. How can we correct the time when we're using individual user like my own user? Please help me to... (4 Replies)