Unsolved

This post is more than 5 years old

2 Posts

10238

July 13th, 2017 05:00

How to connect to server via iDRAC, python

Hi!

I'm connecting to iDRAC via ssh (putty.exe -ssh root@''iDRAC-IP') to the server itself (via command >connect) and it's working fine (both iDRAC and server is password protected). Now I'm trying to write a script in python doing it and executing some commands on the server, but I'm not getting it to work. I am able to connect to the iDRAC (using paramiko) and there do the connect command, but after that it's not working. I think it is because when doing >connect I'm no longer in the iDRAC but the server, and the connection I have in the first step is the iDRAC. Do you have any tips? Is the correct way to do it via a ssh-tunnel? 

Also - the connection to the server using >connect, is that using ssh in turn?

10 Elder

 • 

6.2K Posts

July 13th, 2017 10:00

Hello

The iDRAC and server should be on different IPs. When you connect to the iDRAC via SSH it should not have anything to do with the server's host OS.

I'm trying to write a script in python doing it and executing some commands on the server

What commands are you having issues running on the iDRAC?

Thanks

2 Posts

July 14th, 2017 01:00

Hi!

Everything is working fine when I do the commands manually, and with my script it is working to connect to the iDRAC through "putty.exe -ssh@'iDRAC-IP'". I can also write commands to iDRAC through my script (such as >racadm getssninfo). I can also run the command >connect in the iDRAC which is the command to connect to the server itself (this works manually). What I am not unable to do is run commands to the server after this. I want to run commands such as >ifconfig -a. (Note:everything works manually) I'm thinking it's not working because I'm not setting up a specific "channel" to the new window (corresponding to the server). The channel I have is to the iDRAC through the -ssh... command. Does that make things clearer? So what I want to do is to get it to work to write commands to the server itself. 

Thanks

Anna 

10 Elder

 • 

6.2K Posts

July 14th, 2017 10:00

What I am not unable to do is run commands to the server after this. I want to run commands such as >ifconfig -a. (Note:everything works manually) I'm thinking it's not working because I'm not setting up a specific "channel" to the new window (corresponding to the server). The channel I have is to the iDRAC through the -ssh... command. Does that make things clearer? So what I want to do is to get it to work to write commands to the server itself. 

That has nothing to do with the iDRAC or any Dell product. I'll let the community try to assist with your scripting issue.

Thanks

1 Message

August 24th, 2017 10:00

Hi, is this issue is resolved. I have the similar use case. Please keep us posted.

November 20th, 2018 00:00

import dracclient.client

client= dracclient.client.DRACClient('000.000.22.33.2', 'myyt', 'mnbvsse', port=788)
power = client.get_power_state()
print(power)

output :

 AttributeError: 'NoneType' object has no attribute 'text'

November 20th, 2018 00:00

import dracclient.client

client= dracclient.client.DRACClient('000.000.22.33.2', 'myyt', 'mnbvsse', port=788)
#power = client.get_power_state()
print(power)

it is connecting but i coudnt get any status from server 

November 20th, 2018 00:00

import dracclient.client

client= dracclient.client.DRACClient('000.000.22.33.2', 'myyt', 'mnbvsse', port=788)
power = client.get_power_state()
print(power)

20 Posts

November 20th, 2018 12:00

You might consider checking this out, it looks helpful:

https://github.com/dell/iDRAC-Redfish-Scripting

 

What are the end goals of the script? What funcitonality are you looking for?

November 20th, 2018 17:00

we are trying with dracclient module in python

not with redfish 

 

No Events found!

Top