Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all 3874 articles
Browse latest View live

how to identify below error because i am not able to see implemention of put file

$
0
0

Rebex.Net.SftpException: The server has closed the connection.
at oipb.lojn(Int32 arr)
at oipb.lojp(ruhe& aru)
at oipb.lojm(UInt32 arp, Boolean arq)
at oipb.loip(UInt32 apb, oiok apc)
at Rebex.Net.Sftp.jlvr(oiqc ra, oiok rb, String rc, Stream rd, Int64 re, Int64 rf, rtup rg)
at Rebex.Net.Sftp.jlvp(oiqc qm, oiok qn, String qo, String qp, Int64 qq, Int64 qr, Int64 qs, rtup qt)
at Rebex.Net.Sftp.jlvo(oiqc qf, String qg, String qh, Int64 qi, Int64 qj, Int64 qk, rtup ql)
at Rebex.Net.Sftp.PutFile(String localPath, String remotePath)

getting this type of exception ReadApiExcepionAndThrow Exception


Answered: Web administration user account only

$
0
0

User without any path mappings and with disabled shell will effectively become a Web administration only user. Technically, the user will be able to log in using SSH but will not see any files, will not be able to upload any files and will not access to any commands.

How to read current prompt after ReadUntil

$
0
0

Hi

I want to actually see the current prompt, but ReadUntil do not add the prompt and scripting.Prompt only show my mask prompt that I use to detect the prompt.

On my device the prompt changes depending on user imputs and I want to show them current prompt.

Answered: IP Whitelist based on User

$
0
0

Hi,

It is in our backlog but we have not decided on a milestone yet.

Run the command immediately after creation of the control

$
0
0

Hello,
I want to run to hanlde user's action the following way:

  1. Create a new tab
  2. Add terminalcontrol
  3. Connect by SSH to remote host
  4. Run several commands (user must see them)

this.SetDataProcessingMode(DataProcessingMode.None);
this.Scripting.Send(cmd);
this.SetDataProcessingMode(DataProcessingMode.Automatic);

How to do it properly? If I try to run the command after creation, I get the following exception "Unable to stop background data processing.

Answered: Authentication Do not work in Docker container

$
0
0

Is is a Linux-based Docker container? In that case, you have to use a NTLM plugin (see the KB article for further instructions).

How to handle when ContentType is Application/grpc.

$
0
0

hello.

When using HTTPS, the server's response comes with ContentType: Application/grpc, and the data becomes strange.

If you have such grpc data, please let me know if you know how to handle it.

First of all, the first part of the data is attached with the following information.

0x00, 0x00, 0x02, 0x00, 0x22, 0x0A, 0x9E, 0x80, 0x08, 0x0A, 0x18, 0x61, 0x70, 0x70, 0x6C, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6F, 0x6F, 0x6F, 0x6F 0x63; 0x74, 0x65, 0x74, 0x2D, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6D, 0x12, 0x80, 0x80, 0x08

It seems to have the letters "application/octet-stream" and other information.

This is the first time I've seen such a case and I don't know how to start.
Please help me.

Headers requested:
GET https://content.dropboxapi.com/2/files/download HTTP/1.1
Host: content.dropboxapi.com
Connection: keep-alive
Authorization: Bearer ...
Dropbox-API-Arg: {"path":"id:"}
Range: bytes=0-1048575
User-Agent: RaiDrive/2023.2.39.0

Response header: The total received body size is 1048849.
HTTP/1.1 206 Partial Content
Accept-Ranges: bytes
Content-Disposition: attachment; filename=unspecified
Content-Range: bytes 0-1048575/6080306
Content-Security-Policy: sandbox
Content-Security-Policy: sandbox allow-forms allow-scripts
Etag: W/"5fa254c2c13e12112719d"
Original-Content-Length: 1048576
Vary: Dropbox-API-Arg, Authorization
X-Content-Security-Policy: sandbox
X-Content-Type-Options: nosniff
X-Webkit-Csp: sandbox
Content-Type: application/grpc
Accept-Encoding: identity,gzip
Date: Tue, 25 Apr 2023 09:59:58 GMT
Server: envoy
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Robots-Tag: noindex, nofollow, noimageindex
Content-Length: 1048576
X-Dropbox-Response-Origin: far_remote
X-Dropbox-Request-Id: 39bed946920f47beb96865cf85924cfa

Rebex SSH - Username and Private Key - No Password

$
0
0

Does Rebex support the ability of connecting to a server that requires a username before prompting for the private key; no password being required?

As an example with OpenSSH:
The following is how the connection is setup:
ssh -l username server

It seems like Rebex is simply doing this:
ssh server


Answered: Problem when performing 'pwd' command.

$
0
0

Hello,

please note that Rebex products run on Microsoft .NET, however you are getting a java.rmi.RemoteException. Could you please specify:

  1. Which Rebex product you are experiencing issues with:
  • Rebex SFTP client .NET library
  • Rebex SFTP server .NET library
  • Rebex Buru SFTP server application
  • Rebex Tiny SFTP server application
  1. What are you exactly doing, what is expected result and what is actual result?

LIBSSH2 might also have problems writing files to the Rebex Server.

$
0
0

Hello again, Lukas,

We have been using the Rebex file server to serve files via SCP without issue since your update. Thank you.

Unfortunately, when we send files from our system to the Rebex server we are getting errors.

We're using the call:

libssh2_scp_send64(session, (remote_path + filename).c_str(), file_info.st_mode & 0777, file_info.st_size, file_info.st_mtime, file_info.st_atime);

to send the file. The remote_path value is: "/home/laser/", and the filename is "AdapterTransform.xml":

I've turned on logging inside the Rebex server, which seems to be working, as the path is correct here:

"SCP: Executing command: DEBUG ScpModule(50)[25] scp -pt '/home/laser/AdapterTransform.xml'",

but a few lines down it says this:

Getting item info on '/home/laser/AdapterTransform.xml/AdapterTransform.xml': not found.
2023-04-25 16:55:12.486 DEBUG ScpModule(50)[46] SCP: Opening file '/home/laser/AdapterTransform.xml/AdapterTransform.xml' (Create, Write): failure.

It seems conceivable that this issue is also caused by LIBSSH2 being written in C and not therefore respecting proper .NET string formats.

Would you be able to check into this?

Our previous conversation was here: https://forum.rebex.net/22091/does-rebex-sftp-library-support-the-scp-f-switch-scp1-mode

I've placed the log at this link: https://app.box.com/s/kbp6lrmq6pzih4dn0qiiqv9a47ym4ez2

Answered: Rebex SSH - Username and Private Key - No Password

$
0
0

From the SSH protocol's point-of-view, it is actually impossible to attempt authentication without specifying a username. Therefore, of course, Rebex libraries do support this - otherwise they would not work at all.

If you do "ssh server" with OpenSSH's client, it simply uses the current user's username and sends that to the server. You can easily see this if you enable debug log: "ssh -v server".

With Rebex API, you specify the username in the Login method. Even the parameter-less Login method overload invokes AuthenticationRequest first to ask for the username.

Getting SETSTAT Unsupported operation error when attempting to UPLOAD files

$
0
0

Hi

I'm trying to upload files to a server that connects with a Private Key. We need to preserve the date of the files, so we have client.Settings.RestoreDateTime = ItemDateTimes.LastWriteTime, and the TransferMethod on the upload is set to TransferMethod.Move. We get the below error when we upload:

2023-09-25 21:31:16.241 +08:00 [WRN] FtpSiteActions.Connect: Getting Private key with passphrase
2023-09-25 21:31:16.830 +08:00 [INF] Executing Definition - Starting upload for definition 26
2023-09-25 21:31:17.412 +08:00 [WRN] UPLOAD failed for C:\Datafiles\Uploads
2023-09-25 21:31:17.427 +08:00 [ERR] Cannot upload file ('C:\Datafiles\Uploads\5020UploadsTEST.csv'). Unsupported operation; SETSTAT unsupported.
Rebex.Net.SftpException: Cannot upload file ('C:\Datafiles\Uploads\5020UploadsTEST.csv'). Unsupported operation; SETSTAT unsupported.
---> Rebex.Net.SftpException: Unsupported operation; SETSTAT unsupported.
at kpta.drdr(omwn arv, Type arw)
at kpta.drdd(String aqg, SftpAttributes aqh, kpsk aqi)
at Rebex.Net.Sftp.qbes(String uk, SftpAttributes ul, kpsk um)
at Rebex.Net.Sftp.qbdr(kpub qm, kpsk qn, String qo, String qp, Int64 qq, Int64 qr, Int64 qs, omxj qt)
at kpsv.rfig(kpub anj, String ank, String anl, Int64 anm, Int64 ann)
--- End of inner exception stack trace ---
at omxg.egzt(Exception ewq, TransferProblemType ewr, omxd ews, omxd ewt, BatchProblemReactions ewu, BatchProblemReactions ewv, BatchProblemReactions& eww)
at omxg.egzs(Exception ewj, String ewk, TransferProblemType ewl, omxd ewm, omxd ewn, BatchProblemReactions ewo, BatchProblemReactions& ewp)
at omxg.egzl(String evk, String evl, omxd evm, omxd evn, omxd evo, omxd evp, Boolean evq, Boolean evr, Boolean evs)
at omxg.egzk(omxe evj)
at omxg.egzh()
at omxg.egzc(TransferAction euu, omxc euv, String euw, TransferMethod eux, MoveMode euy, LinkProcessingMode euz, ActionOnExistingFiles eva, omxd evb)
at Rebex.Net.Sftp.qbev(TransferAction ut, kpsk uu, kpsu uv, String uw, TransferMethod ux, MoveMode uy, LinkProcessingMode uz, ActionOnExistingFiles va)
at Rebex.Net.Sftp.qbfn(Object wv, Enum ww, Object[] wx)
at omjz.gsbm(Object iz)
--- End of stack trace from previous location ---

If I upload the same files to our sftp sever we don't get the SETSTAT unsupported error, so it appears to be a setting on the server. It also appears that the file is uploaded, but it's not deleted when the upload has completed?

Repeated Socket Error 10038 causing possible network instability?

$
0
0

We get a lot of 10038 socket exceptions using Rebex.Net.Ftp.Connect and A) we are trying to reduce those and B) see if repeated instances of these exceptions can cause system instability... i.e. problems with other applications using WinSock ?

Do you guys have any advice on what we can do to try to avoid these and do you any insight into what the consequences of possibly having over a hundred of these in one day could do to the operating system?

Below is the output from the Rebex.Ftp trace log that is relevent

INFO Ftp(9)[161488450] Info: Assembly: Rebex.Ftp 2018 R2.1 for .NET Compact Framework 3.5
INFO Ftp(9)[161488450] Info: Platform: Windows CE 7.0.2882 32-bit; CLR: 3.5.19072.0
DEBUG Ftp(9)[161488450] Info: Culture: en; windows-1252
Ftp(9)[161488450] Info: Using proxy none
Info: Rebex.Net.FtpException: Socket error 10038 occured. ---> Rebex.Net.ProxySocketException: Socket error 10038 occured. ---> System.Net.Sockets.SocketException: An operation was attempted on something that is not a socket
at System.Net.Sockets.Socket.ConnectNoCheck(EndPoint remoteEP)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at wsit.Connect(EndPoint remoteEP)
at wsiw.vxrr(IPEndPoint ds)
at wsiy.Connect(EndPoint endPoint)
at Rebex.Net.ProxySocket.Connect(EndPoint remoteEP)
at Rebex.Net.ProxySocket.Connect(String serverName, Int32 serverPort)
at eeoi..ctor(Ftp oe, ISocketFactory of, String og, Int32 oh)
at Rebex.Net.Ftp.pgdg(String ev, Int32 ew, TlsParameters ex, SslMode ey, FtpSecureUpgradeType ez)
at Rebex.Net.Ftp.pgdf(String eq, Int32 er, TlsParameters es, SslMode et, FtpSecureUpgradeType eu)
at Rebex.Net.Ftp.Connect(String serverName, Int32 serverPort, SslMode security)
at FtpPush.FtpRebex.TryConnectToFTPServer()
at FtpPush.TargetFtp.InitializeFtpRebexList(UpDown UpDw)
at FtpPush.TargetFtp.OpenFtps(UpDown UpDowx)
at FtpPush.FtpSession.Uploading(List1 TargLactive, Boolean AssosiatedToConmgrCE, ConnWay connectWay) at FtpPush.FtpSession.StorageLoop() at Rebex.Net.ProxySocket.Connect(EndPoint remoteEP) at Rebex.Net.ProxySocket.Connect(String serverName, Int32 serverPort) at eeoi..ctor(Ftp oe, ISocketFactory of, String og, Int32 oh) at Rebex.Net.Ftp.pgdg(String ev, Int32 ew, TlsParameters ex, SslMode ey, FtpSecureUpgradeType ez) at Rebex.Net.Ftp.pgdf(String eq, Int32 er, TlsParameters es, SslMode et, FtpSecureUpgradeType eu) at Rebex.Net.Ftp.Connect(String serverName, Int32 serverPort, SslMode security) at FtpPush.FtpRebex.TryConnectToFTPServer() at FtpPush.TargetFtp.InitializeFtpRebexList(UpDown UpDw) at FtpPush.TargetFtp.OpenFtps(UpDown UpDowx) at FtpPush.FtpSession.Uploading(List1 TargLactive, Boolean AssosiatedToConmgrCE, ConnWay connectWay)
at FtpPush.FtpSession.StorageLoop()
at Rebex.Net.Ftp.pgdg(String ev, Int32 ew, TlsParameters ex, SslMode ey, FtpSecureUpgradeType ez)
at Rebex.Net.Ftp.pgdf(String eq, Int32 er, TlsParameters es, SslMode et, FtpSecureUpgradeType eu)
at Rebex.Net.Ftp.Connect(String serverName, Int32 serverPort, SslMode security)
at FtpPush.FtpRebex.TryConnectToFTPServer()
at FtpPush.TargetFtp.InitializeFtpRebexList(UpDown UpDw)
at FtpPush.TargetFtp.OpenFtps(UpDown UpDowx)
at FtpPush.FtpSession.Uploading(List`1 TargLactive, Boolean AssosiatedToConmgrCE, ConnWay connectWay)
at FtpPush.FtpSession.StorageLoop()

Answered: Getting SETSTAT Unsupported operation error when attempting to UPLOAD files

$
0
0

Apparently, the server does not support SFTP protocol's SETSTAT operation that is used by the SFTP client to update the file's last write time attribute. This is most likely either a deliberate choice of the server maintainers, or a limitation of the underlying file system of the server's file storage. To find out the exact reason, you would have to ask the server operators.

When an error like this occurs, Rebex SFTP client does not delete the remote file. It also does even delete the file when any other error occurs during the transfer, even if it has not been fully uploaded. We believe the choice whether to delete the file or not is best left to the client application.

How i can create a tunnel between two servers using TLS proxy

$
0
0

I have a HTTP server that uses TLS 1.0/1.1 and it has to communicate with a different server that accepts TLS 1.2 communication. What is the right syntax to configure the tunnel between two and in case if any certificate has to be created where i should create in the source server or TLS proxy server ?


Rebex TLSSocket on netcf3.5

$
0
0

Hi I am evaluating Rebex TlsSocket to establish secured TLS1.2 MQTT connection with Aws IoT Hub. We have volume field devices and a successful trial should help us connect all the field devices with AWS IoT Hub.

I referred to this article and followed all steps https://forum.rebex.net/9807/how-to-use-tlssocket-directly?show=9807#q9807

Code:

this.tlsSocket = new TlsClientSocket();
tlsSocket.LogWriter = new Rebex.FileLogWriter(@"D:\log.txt",Rebex.LogLevel.Debug);
this.tlsSocket.Connect(new IPEndPoint(this.remoteIpAddress, this.remotePort));
tlsSocket.Parameters.Version = TlsVersion.TLS12;
//var cert = Certificate.LoadPfx("devicecert.pfx", "");
tlsSocket.Parameters.CertificateRequestHandler = CertificateRequestHandler.CreateRequestHandler(clientCert);
tlsSocket.Parameters.CertificateVerifier = CertificateVerifier.Default;
tlsSocket.ValidatingCertificate += new EventHandler<SslCertificateValidationEventArgs>(tlsSocket_ValidatingCertificate);

I am getting following error:

2023-05-23 00:12:00 INFO TlsSocket(54267293)[1] TLS: Performing client certificate authentication.
2023-05-23 00:12:00 DEBUG TlsSocket(54267293)[1] TLS: Error while processing TLS packet: System.Security.Cryptography.CryptographicException: Unable to create SHA256 hash using 楍牣獯景⁴湅慨据摥䌠祲瑰杯慲桰捩倠潲楶敤⁲ㅶ〮� (0x80090008).
   at ghric.xtdkc.wbbry(Byte[] p0, aippr p1)
   at Rebex.Security.Cryptography.AsymmetricKeyAlgorithm.SignHash(Byte[] hash, SignatureHashAlgorithm hashAlgorithm)
   at ghric.autbd.hwlnr(Byte[] p0, Int32 p1, Int32 p2, ivnfx p3)
   at ghric.autbd.fwlia(Byte[] p0, Int32 p1, Int32 p2)
   at ghric.yexzh.fcfxr(Byte[] p0, Int32 p1, Int32 p2)
   at ghric.yexzh.loqiv()
2023-05-23 00:12:01 INFO TlsSocket(54267293)[1] TLS: Fatal Alert:InternalError was sent.
2023-05-23 00:13:07 Opening log file.
2023-05-23 00:13:07 INFO FileLogWriter(1)[1] Info: Assembly: Rebex.Common R5.11 for .NET Compact Framework 3.5

My client Certificate file "devicecert.pfx does not have any password set. I am able to use same certificate on .NET 4.5 Windows to connect.

Answered: How i can create a tunnel between two servers using TLS proxy

$
0
0

I suppose you want to tunnel communication from your TLS 1.0/1.1 server to TLS 1.2 server. You can run the TLS Proxy with settings like this:

tlsproxy tunnel add
  --in 0.0.0.0:443 --in-protocol TLS --in-tls-versions TLS10,TLS11
  --out second.server.com:443 --out-protocol TLS --out-tls-versions TLS12
  --certificate-path c:\data\second-server.pfx

Since you want to translate from TLS, you need a certificate. The certificate must be issued for domain, which will be used by your HTTP server to establish TLS connections. Typically:

  • second.server.com - you need to route network traffic to the proxy (using DNS or hostfile) instead original second.server.com

You can also use:

  • localhost if the proxy will run on the same machine
  • my.proxy.com if the proxy will run on the different machine

However, please note that it can change behavior of the application, because HTTP Host header will be set to localhost (or my.proxy.com). We are working on possibility to set Host header for such cases, but it is not done yet.


Alternatively, if you don't need to use TLS on your HTTP server to request other server, you can use this settings:

tlsproxy tunnel add
  --in 0.0.0.0:443
  --out second-server:443 --out-protocol TLS --out-tls-versions TLS12

In this case no certificate is needed, since communication between your HTTP server and the TLS Proxy will not be encrypted.

Rebex Tiny Web Server - Problems with HTTPS Domain URLs - Add Server URLs for HTTPS

$
0
0

Dear Sir or Madam,

I am trying to setup a test HTTPS Web server in a specific domain created in the local machine and with the DNS Server of the machine (everything is in a local network for testing).

The HTTP web server is working with the http://www.exampledomain.com

However, in HTTPS, there is a problem since it is not possible to work with https://www.exampledomain.com. The Certificate is included in the "Trusted Root Certification Authorities" store but the web browser gives an error:

NET::ERRCERTCOMMONNAMEINVALID
This server could not prove that it is www.exampledomain.com; its security certificate is from localhost. This may be caused by a misconfiguration or an attacker intercepting your connection.

Note: https://localhost is working fine.

I do not know if this is a limitation of the application due to that the certificate that is created is only valid for https://localhost and the application can only work with https://localhost.

I do not know if there is a way to include more Server URLs in the application or any way to overcome this problem.

Any comment is welcome.

Thanks.

Best regards,
Eduardo

Answered: Buru SFTP automatic encryption file at rest

$
0
0

Encryption of files at rest is not supported by Rebex Buru SFTP Server.

rebex ftp (no encryption)

$
0
0

Hi Team,

     We want to use all three modes o FTP (No Encryption, Implict, Explicit) can you please guide how to use No encryption mode?
Viewing all 3874 articles
Browse latest View live