login about faq

Hi, I have a question about SSH Connection, does ssh lib for iOS support :wq command? When I try to type it always returns a "command not found" message

asked Sep 04 '12 at 00:53

app13's gravatar image

app13
1111


I don't entirely understand the question. Are you referring to ":wq" one might type while within the "vi" editor?

link

answered Sep 04 '12 at 13:18

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

yes, correct. sorry for the confusion :)

(Sep 04 '12 at 21:49) app13

The only way to answer this question is to explain the fundamental concepts of an SSH shell session. The SSH lib does not provide "support" for individual commands. In other words, the library doesn't have code within it that somehow recognizes and supports every possible Linux/Unix command.

When you use the SSH lib to connect to an SSH server, authenticate, open a channel, and then start a shell session on the channel, you have a connection that behaves exactly as if you were typing into a terminal prompt. The text sent via Ssh.ChannelSendString (or ChannelSendData) is equivalent to typing that text at a terminal prompt. The data you read back is the standard output (and standard error). It doesn't make sense to ask if a particular command is "supported".

link

answered Sep 05 '12 at 17:01

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×89
×1

Asked: Sep 04 '12 at 00:53

Seen: 1,252 times

Last updated: Sep 05 '12 at 17:01

powered by OSQA