Comments (4)
Agreed.
I compiled it without problem a couple of weeks ago but then it had a problem reading my known_hosts file (typical windows pathname problem) reported as #37.
open C:\tools\cygwin\home\windo\.ssh\known_hosts: The system cannot find the path specified
When I have some time I'll try a workaround and retest to see if the known_hosts is the only blocker ...
from mole.
I've spent some time today to understand what need to be changed to allow mole
to be both compiled and executed on Windows and here are my findings:
Environment
Operating System: Windows 10
Go Version: go version go1.11.2 windows/amd64
No linux emulation software was installed during this investigation.
Changes Required
- Add
golang.org/x/sys/windows
tovendor directory
to allow the Go compiler to generate the windows executable mole
is trying to get the user home directory through theHOME
environment variable, which does not exist on Windows.USERPROFILE
should be used instead.
We might need to set what env. variable should be used to get the home user directory by using build flags (i.e. https://stackoverflow.com/questions/19847594/how-to-reliably-detect-os-platform-in-go).
$ ag HOME --ignore vendor
cmd/mole/main.go
31: instancesDir = fmt.Sprintf("%s/.mole/instances", os.Getenv("HOME"))
docs/index.md
16: * Leverage the SSH Config File: use some options (e.g. user name, identity key and port), specified in *$HOME/.ssh/config* whenever possible, so there is no need to have the same SSH server configuration in multiple places.
174:$ cat $HOME/.ssh/config
storage/storage_test.go
104: os.Setenv("HOME", dir)
storage/storage.go
135: return filepath.Join(os.Getenv("HOME"), ".mole.conf")
tunnel/config.go
20:// ssh config file from $HOME/.ssh/config.
22: configPath := filepath.Join(os.Getenv("HOME"), ".ssh", "config")
127: return filepath.Join(os.Getenv("HOME"), id[1:])
tunnel/example_test.go
18: // tunnel.NewServer will not try to lookup any value using $HOME/.ssh/config
tunnel/tunnel.go
26:// NewServer creates a new instance of Server using $HOME/.ssh/config to
69: key = filepath.Join(os.Getenv("HOME"), ".ssh", "id_rsa")
251: knownHostFile := filepath.Join(os.Getenv("HOME"), ".ssh", "known_hosts")
tunnel/tunnel_test.go
250: os.Setenv("HOME", home)
tunnel/doc.go
3:forwarding, leveraging the SSH configuration file (e.g. $HOME/.ssh/config) to
9:The module looks for the ssh config file stored on $HOME/.ssh/config only.
I no one else picks this issue before me, I will try to work on them later this week, whenever I get some free cycles.
@mjbright, once I get it working under the scenario I described, I can take a look what is the issue with Cygwin
from mole.
from mole.
New version, 0.3.0, was just released and it includes support for windows!
https://github.com/davrodpin/mole/releases/tag/v0.3.0
from mole.
Related Issues (20)
- Question on Usage: Define source as a non-existent hostname/domain name HOT 1
- logon using privatekey denied. error ssh: handshake failed: knownhosts: key is unknown HOT 1
- error runtime: bad pointer in frame github.com/konsorten/go-windows-terminal-sequences HOT 1
- Fix `add alias` help
- request for ENHANCEMENT: [github] xanzy/ssh-agent and/or passphrases for private keys ... HOT 3
- Feature request: unix socket forwarding
- Key mismatch HOT 8
- Missing `config` attribute on `<alias>.toml` file causing application to fail HOT 2
- New feature: SOCKS support
- ProxyCommand parameter in config not used, cannot use ssh proxy jump host HOT 1
- Can't get running configuration of detached instance HOT 1
- [Feature Request] Support aarch64 architecture for Raspberry Pi HOT 1
- [Feature Request] Support Remote Forwarding HOT 1
- [Feature Request] alias for remote port forwarding HOT 1
- Find another way to find is key is encrypted
- --detach not working HOT 8
- Mole not support ssh Include configuration files
- Show instances is not returning anything
- How to
- Ignoring IdentityAgent from SSH config and -A CLI option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mole.