Skip to content
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

How to login to the command line using telnet? #59

Open
vincentxuan0301 opened this issue Jun 19, 2023 · 2 comments
Open

How to login to the command line using telnet? #59

vincentxuan0301 opened this issue Jun 19, 2023 · 2 comments
Labels
needs more info The issue is not clear or could not be reproduced and needs further information by the creator

Comments

@vincentxuan0301
Copy link

I wish using telnet ip port to log in to the command line, but it's stuck here
image

@vincentxuan0301 vincentxuan0301 changed the title How to log in to the command line using telnet? How to login to the command line using telnet? Jun 19, 2023
@skaldesh
Copy link
Member

Can you share some code? Not sure what the problem is

@skaldesh skaldesh added the needs more info The issue is not clear or could not be reproduced and needs further information by the creator label Jun 19, 2023
@vincentxuan0301
Copy link
Author

server code :

         handleFunc := func(rl *readline.Instance) {
		var app = grumble.New(&grumble.Config{
			Name:                  "test",
			Description:           "An awesome testbar",
			Prompt:                "test>> ",
			PromptColor:           color.New(color.FgGreen, color.Bold),
			MultiPrompt:           "test >> ",
			MultiPromptColor:      color.New(color.FgGreen, color.Bold),
			HelpHeadlineColor:     color.New(color.FgGreen),
			HelpHeadlineUnderline: true,
			HelpSubCommands:       true,
			InterruptHandler: func(a *grumble.App, count int) {
			},
		})
		if err := app.RunWithReadline(rl); err != nil {
			log.Logger.Error("RunWithReadline, err: ", err)
		}

	}
	cfg := &readline.Config{}
	readline.ListenRemote("tcp", ":37300", cfg, handleFunc)

It works by using readline, but i can't use telnet to connect

if err := readline.DialRemote("tcp", pod.Status.PodIP+":37300"); err != nil {
        fmt.Errorf("An error occurred: %s \n", err.Error())
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info The issue is not clear or could not be reproduced and needs further information by the creator
Projects
None yet
Development

No branches or pull requests

2 participants