paulmaddox / drac-kvm Goto Github PK
View Code? Open in Web Editor NEWA simple CLI launcher for Dell DRAC KVM sessions
License: Apache License 2.0
A simple CLI launcher for Dell DRAC KVM sessions
License: Apache License 2.0
Hi,
Congrats for this code, very useful :)
Since it's kind of the first time I'm writing Go, I'd like some advice for this feature proposal :
I'm beginning a PR for a config file support in order to add username and password for a specific IP or host
Like ssh_config :
ssh(1) obtains configuration data from the following sources in the following order:
1. command-line options
2. user's configuration file (~/.ssh/config)
[..]
I was thinking of using https://github.com/Unknwon/goconfig/ and a format like:
[192.168.0.42]
username = root
password = password4root
[web-1]
username = root
password = password4root
So we can use ./idrac-kvm -h web1 or ./idrac-kvm -h 192.168.0.42
What do you think ?
in ~/
-rw-r--r-- 1 staff 22K Jul 17 07:19 .drackvmrc
I attached hosts and it fails to find the file.
drac-kvm -h hostname defined in .drackvmrc
[host]
host = hostip
username = ilouser
password = ilopass
When entering the password it is displayed back on the screen. This is counter to the expected behavior of a password prompt.
main.go:32: multiple-value gopass.GetPasswd() in single-value context
drac.go http.Transport Dial
override seems to make IPv6 not work. Commenting this out is a fix (though Java web start/IcedTea don't seem to support it anyway).
But then we lose timeout...
transport := &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
/*Dial: func(netw, addr string) (net.Conn, error) {
deadline := time.Now().Add(5 * time.Second)
c, err := net.DialTimeout("tcp6", addr, time.Second*5)
if err != nil {
return nil, err
}
c.SetDeadline(deadline)
return c, nil
},*/
}
In a future update, allow passing a password thru the command line would be a good addition.
With firmware 2.31.31.30, I can no longer use drac-kvm. It loads the java applet, but always ends with:
"Login failed with an access denied error."
I can still login just fine from the web page. Still using root and calvin. I made sure certs were installed for java and everything.
It would be awesome to add the support for iLO3 and iLO4 too!
Hi Paul,
I've encountered this issue while compiling drac-kvm on my own: ./main.go:32:32: multiple-value gopass.GetPasswd() in single-value context
Here is the simple fix:
index 477f995..6170af5 100644
--- a/main.go
+++ b/main.go
@@ -29,7 +29,13 @@ const(
func promptPassword() string {
fmt.Print("Password: ")
- return string(gopass.GetPasswd())
+ pass, err := gopass.GetPasswd()
+
+ if err != nil {
+ log.Fatalf("GetPasswd error (%s)", err)
+ }
+
+ return string(pass)
}
func main() {
I've occasionally got the need to fire up a console via and old fashioned windows cmd prompt, which of course doesn't like /usr/..../javaws. It would great if on windows the default path used the standard jre install location C:\bla\bla\bla
I tried both a few idrac 6 series (R610) and 7 series (R720/620) to no avail.
In my local copy I've added a version flag that allows selecting 6 or 7 and it works. I'd also like to improve the autodection by logging in using the /data/login endpoint and then scraping /viewer.jnlp for iDRAC 6 / iDRAC 7.
Would you have any issues with me doing this and then sending pull requests?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.