Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalSSH
Commits
e30076a0
Commit
e30076a0
authored
Feb 28, 2019
by
Lukas Burgey
Browse files
Cleanup some code
parent
50c7814b
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.go
View file @
e30076a0
...
...
@@ -226,30 +226,15 @@ func sshConnect(creds api.Credentials) {
var
err
error
var
client
*
sshclient
.
Client
client
,
err
=
sshclient
.
DialWithKey
(
"room.hadiko
:22"
,
"burgey"
,
"/home/burgey/.ssh/id_room.hadiko"
,
sshHost
+
"
:22"
,
sshUser
,
*
pubKey
,
)
if
err
!=
nil
{
log
.
Fatalf
(
"Error dialing: %s"
,
err
)
}
defer
client
.
Close
()
/*
log.Printf("Opening remote shell")
err = client.Shell().Start()
if err != nil {
log.Fatal(err)
}
*/
// default terminal
/*
log.Printf("Opening remote terminal")
if err := client.Terminal(nil).Start(); err != nil {
log.Fatal(err)
}
*/
cmd
:=
exec
.
Command
(
"ssh"
,
"-i"
,
"/home/burgey/.ssh/id_room.hadiko"
,
"room.hadiko"
)
cmd
.
Stdout
=
os
.
Stdout
err
=
cmd
.
Run
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment