-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Several improvements #115
Several improvements #115
Conversation
After that PR, agent forwarding started working for me |
@@ -1178,10 +1178,12 @@ func sshAgentForward(args *sshArgs, param *sshParam, client *ssh.Client, session | |||
warning("forward agent but the socket address is not set") | |||
return | |||
} | |||
if err := forwardToRemote(client, addr); err != nil { | |||
|
|||
if err := agent.ForwardToAgent(client, getAgentClient(args, param)); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1password doesn't support keep using the same agent connection. #51
}) | ||
|
||
// Ssh agent forwarding must start before session.Shell or session.Command. | ||
agentForwarding = func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite follow this.
conn.Close() | ||
agentClient = nil | ||
}) | ||
if args.ForwardAgent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are also args.NoForwardAgent
and strings.ToLower(getOptionConfig(args, "ForwardAgent")) == "yes"
.
// Let's postpone forwarding - maybe we won't have to do it. | ||
afterLoginFuncs = append(afterLoginFuncs, func() { | ||
// ssh forward | ||
sshForward(ss.client, args, param) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The warning message should be output before logging in, but now it may be output after logging in.
conn, err := winio.DialPipe(addr, &timeout) | ||
|
||
if err != nil { // Plan B. | ||
conn, err = pageant.NewConn() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should check whether openssh agent
or pageant
is currently running first.
pageant merged with changes as b518f22 |
No description provided.