Linux discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2011 04:09 AM
In my environment, I was able to discover all window assets with no problem.
I started working on Linux server discovery but unfortunately, the Linux assets are not reporting to my instance.
So far these are the steps I took to fascilitate the discovery. could you please tell me if there might be a step that I"m missing? Thanks
•We setup the Linux account in Service Now instance
•Setup the account in the Linux system and give root privilege to run the sudo command below.
[username] ALL=(root) /sbin/dmidecode
[username] ALL=(root) /sbin/lsof
- Labels:
-
Discovery
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2011 05:15 PM
When I checked later today, I found out that most of the IP addresses for the Linux server reported back but with an error message "SSH Authentication or connection failure"
How can I debug this and what might be wrong with my settings? Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2011 01:26 AM
The first thing to check might be to use a SSH client from the MID server host and manually try to connect to the target host using the credentials entered. Just to make sure the credentials are correct and the MID server host is allowed to logon.
From the error message you provided we can see that a SSH connection is attempted - so we must be able to "see" port 22 - but none of the credentials have worked.
Regards,
Anders
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2013 05:35 AM
Hi,
I am facing the same issue. My credential are working fine when i checked it by login via putty from MID Server. but when i run discovery, it gives error "SSH authentication or connection failure".
Regards,
Nikhil Agarwal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2013 09:36 AM
This is the way we finally got it to work
First thing to check.
1. Make sure you put the credential in the "Credential" section of your Service Now instance and select "SSH" as the protocol. This step requires both the account name/password.
2. Test your discovery again and if it failed with the same error message as you mentioned above. Do the following
a. Login to your linux box as an Admin
b. Run the 2 commands below to document the path to both dmidecode and lsof
# which dmidecode
# which lsof
c. To access the sudo file you need to type: # visudo
d. Add your credential to dmidecode and lsof by adding this line below in the sudo file
Your-credential ALL=NOPASSWD:dmidecode path,lsof path
Note: The path in the command for dmidecode/lsof are the ones you documented in step b. above. Below is the example of the complete path and command :
Snaccount ALL=NOPASSWD:/usr/sbin/dmidecode,/usr/bin/lsof
e. Save and exit the visudo operation with "wq!"
f. Verify the changes you just made to the visudo file with the command below - you should see the new line that you added for your credential.
# tail /etc/sudoers
g. You now need to validate/configure your credential account user's path. Login or SU with your discovery credential this time and type the command below to determine if both dmidecode and lsof path are in your credential default path. If they are, then you are done.
# echo SPATH
h. If dmidecode or lsof or both are not in your credential path, you need to create .profile file by following these steps below:
i. vi /home/yourcredential/.profile
ii. Add the line: "export PATH=$PATH:/USR/sbin" to .profile
iii. Save and Exit vi
iv. Verify the changes: tail /home/yourcredential/.profile
v. Exit the system and log back with your credential to verify the changes you just made.
vi. Type : echo $PATH to validate that both dmidecode/lsof are now included in your credential user's default path
f. Now you need to do the final testing to validate that both dmidecode/lsof will not prompt you for password - this is very important for discovery to work
Type: sudo lsof | head
Note: you should be able to run this command without any prompt for password or errors
g. Type: sudo dmidecode | head
Note: you should be able to run this command also without any prompt for password or errors
Now you are ready to disco. Initiate your discovery again and let me know the outcome. We have to do these steps in our environment to make linux discovery works.