[GitHub] [mina-sshd] tomaswolf commented on issue #309: Allow for the use of HTTP or SOCKS proxies

2023-01-10 Thread GitBox


tomaswolf commented on issue #309:
URL: https://github.com/apache/mina-sshd/issues/309#issuecomment-1378337756

   It is possible to connect via HTTP or SOCKS proxies with Apache MINA sshd. 
But the library does not provide this feature out of the box; users have to 
write their own code.
   
   See 
[SSHD-1008](https://issues.apache.org/jira/browse/SSHD-1008?focusedCommentId=17121296=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17121296).
   
   Also related: [SSHD-751](https://issues.apache.org/jira/browse/SSHD-751)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[GitHub] [mina-sshd] Ingo13F opened a new issue, #309: Allow for the use of HTTP or SOCKS proxies

2023-01-10 Thread GitBox


Ingo13F opened a new issue, #309:
URL: https://github.com/apache/mina-sshd/issues/309

   ### Description
   
   I am using MINA SSHD as part of Spring Integration 6.0.1 since it replaced 
the JSch SSH implementation there.
   However I was using a HTTP proxy to connect with JSch and this seems to be 
no longer possible with MINA because it supports only SSH jump hosts as a proxy.
   
   So my request would be to implement a more flexible approach to proxies and 
also allow for the use of HTTP and SOCKS proxies.,
   
   ### Motivation
   
   This feature is needed to make it possible to use MINA SSHD and the 
frameworks that depend on it in environments where the server being accessed 
can only be reached via an HTTP/SOCKS proxy.
   
   Especially In scenarios where MINA SSHD is used for transferring data via 
SFTP this seems not to be a far-fetched scenario. 
   
   ### Alternatives considered
   
   An alternative would be to install a jump host with internet access. 
However, in larger organizations this might not always be possible or takes a 
long time to make it through all the corporate red tape.
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org



[jira] [Commented] (SSHD-1317) Finding default shell and its escape, quote characters

2023-01-10 Thread Jira


[ 
https://issues.apache.org/jira/browse/SSHD-1317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17656582#comment-17656582
 ] 

dgü commented on SSHD-1317:
---

Hello!

Using _echo_ command may be useful if shell builtin _echo_ takes precedence 
over {_}/bin/echo{_},etc. or they work same.

This may be a pseudo code to find escape character:
{code:java}
char escapeChar;
String commandOutput = execute("echo ^^``"); 

switch (commandOutput) {
 case "^``"   :  //for CMD
 escapeChar = '^';
 break;
 case "^^`"   :  //for PowerShell
 escapeChar = '`';
 break;
case "^^``\\" :  //for sh
 escapeChar = '\\';
 break;
 default  :  //not found
 escapeChar = 0;
 break;
}

After escape character found, quote character can be found too.

This may be a pseudo code to find quote character:

boolean isQuoteChar(char pQuoteChar, char pEscapeChar} {

   String escapeString =  
   String.valueOf(pEscapeChar)+String.valueOf(pEscapeChar);
   String commandOutput = execute("echo " + 
   pQuoteChar+escapeString+pQuoteChar);

   if (commandOutput.contains(escapeString)) {
 // escape chracter is preserved. 
 return true;
   } else {
     // escape chracter is not preserved. 
 return false;
   }
}
{code}
I'm not a shell expert. If you see an error, please let me know.

Thanks!

> Finding default shell and its escape, quote characters
> --
>
> Key: SSHD-1317
> URL: https://issues.apache.org/jira/browse/SSHD-1317
> Project: MINA SSHD
>  Issue Type: Question
>Reporter: dgü
>Priority: Major
>
> Hello!
> I execute remote commands by exec channel. Arguments of the commands may 
> include shell ({_}sh{_},{_}cmd{_},...) special characters(ie: _^_ for 
> {_}cmd{_}). These special characters may work different on different shells. 
> So, I must escape or quote them.
> is it possible to find the followings by SSHD ? 
>  * Default shell of SSH server
>  * Escape character of shell
>  * Quote character of shell
> Thanks in advance!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org