Comments (5)
that's weird, this should work, can you try again. I could have sworn the new ssh client package I'm using does this.
from cpu.
[tru@elitebook840g3 cpu]$ go version
go version go1.17 linux/amd64
[tru@elitebook840g3 cpu]$ git pull
Already up-to-date.
[tru@elitebook840g3 cpu]$ git status
# On branch main
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: go.mod
#
no changes added to commit (use "git add" and/or "git commit -a")
[tru@elitebook840g3 cpu]$ git diff
diff --git a/go.mod b/go.mod
index acb4545..8fb3b74 100644
--- a/go.mod
+++ b/go.mod
@@ -23,3 +23,5 @@ require (
github.com/vishvananda/netlink v1.1.1-0.20211118161826-650dca95af54 // indirect
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
)
+
+require github.com/hashicorp/errwrap v1.0.0 // indirect
[tru@elitebook840g3 cpu]$ ~/go/bin/gox -os="linux" -arch="amd64" ./...
Number of parallel builds: 3
--> linux/amd64: github.com/u-root/cpu/cmds/cpud
--> linux/amd64: github.com/u-root/cpu/cmds/cpu
trying ssh and cpu:
[tru@elitebook840g3 cpu]$ ssh here cat /tmp/toto
titi
[tru@elitebook840g3 cpu]$ ./cpu_linux_amd64 -d -bin /home/tru/git/github.com/u-root/cpu/cpud_linux_amd64 here cat -r /tmp/toto
2022/03/07 22:23:04
Running as client, to host "here", args "cat -r /tmp/toto"
2022/03/07 22:23:04 getKeyFile for ""
2022/03/07 22:23:04 key file from config is "~/.ssh/keys/5CG6481CF1/id_ed25519"
2022/03/07 22:23:04 getKeyFile returns "/home/tru/.ssh/keys/5CG6481CF1/id_ed25519"
2022/03/07 22:23:04 getPort("here", "")
2022/03/07 22:23:04 config.Get("here",""): "22"
2022/03/07 22:23:04 getPort: return default "23"
2022/03/07 22:23:04 returns "23"
2022/03/07 22:23:04 SSH error ParsePrivateKey /home/tru/.ssh/keys/5CG6481CF1/id_ed25519: ssh: this private key is passphrase protected
from cpu.
Ah, that thing. This is because of an opinionated decision. Look closely at the port decision: cpu forces using port 23 when 22 is provided.
https://github.com/u-root/cpu/blob/59e1ebe6207a2294ce032c73b0476bbae956ceb6/cmds/cpu/cpu.go#L401-403
from cpu.
IIRC, the idea was to distinguish between regular SSH and this implementation of cpu building on top of it.
Should we add a flag in order to allow for using cpu as a regular SSH client?
Like, cpu -ssh remote-machine ls
? It could imply the port 22 even.
from cpu.
I have added port 23 in my .ssh/config file:
Host localhost here
hostname localhost
IdentitiesOnly=yes
IdentityFile ~/.ssh/keys/5CG6481CF1/id_ed25519
ForwardX11 yes
Port 23
I need to force the -p 22
to have ssh working:
[tru@elitebook840g3 cpu]$ ssh -p 22 here cat /tmp/toto
X11 forwarding request failed on channel 1
tototot
[tru@elitebook840g3 cpu]$ ./cpu_linux_amd64 -d -bin /home/tru/git/github.com/u-root/cpu/cpud_linux_amd64 here cat -r /tmp/toto
2022/03/31 14:50:17
Running as client, to host "here", args "cat -r /tmp/toto"
2022/03/31 14:50:17 getKeyFile for ""
2022/03/31 14:50:18 key file from config is "~/.ssh/keys/5CG6481CF1/id_ed25519"
2022/03/31 14:50:18 getKeyFile returns "/home/tru/.ssh/keys/5CG6481CF1/id_ed25519"
2022/03/31 14:50:18 getPort("here", "")
2022/03/31 14:50:18 config.Get("here",""): "23"
2022/03/31 14:50:18 returns "23"
2022/03/31 14:50:18 SSH error ParsePrivateKey /home/tru/.ssh/keys/5CG6481CF1/id_ed25519: ssh: this private key is passphrase protected
from cpu.
Related Issues (20)
- Newbie questions and feature requests HOT 3
- cpu command does not work in non-interactive environment HOT 1
- crash on IO copy HOT 1
- `cpud` command hang when `dsEnabled` is false HOT 2
- doc.go's out of date
- private key inline
- cmd/cpud doesn't build on osx HOT 1
- Update README HOT 1
- running dbench fails on cpu due to unimplemented functions HOT 1
- makefile fails on missing gox command HOT 1
- Missing move, check on lock
- \r \n line insertions on Darwin to Linux in terminal HOT 3
- forward p9p services into remote
- Missing much of /etc in Docker cpud? HOT 2
- opportunities to improve cpu performance? HOT 2
- No file locking complicates running some programs from cpu HOT 2
- Using cpu as a module in another application
- Docker example not working on Debian 12 amd64
- Running the docker server changes permissions of /dev/ptmx, crashing tmux
- cpud did not connect for more than 100ms HOT 1
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 cpu.