Opening a root file from a server with password

Dear ROOT expert,

I need to open ROOT files from a server, without connecting to it using ssh.

I have trying to use BasicAuth connection of TFile:
TFile *h = TFile::Open(“https://myusername:mypassword@nusrv9.na.infn.it:/path/file.root”)

and it returned this error:

SysError in TUnixSystem::UnixTcpConnect: connect (nusrv9.na.infn.it:443) (Connection refused)
Error in TSSLSocket::WrapWithSSL: cannot connect
Error in TWebFile::GetHead: cannot connect to host nusrv9.na.infn.it (errno=9)
SysError in TUnixSystem::UnixTcpConnect: connect (nusrv9.na.infn.it:443) (Connection refused)
Error in TSSLSocket::WrapWithSSL: cannot connect
Error in TWebSocket::ReOpen: cannot connect to host nusrv9.na.infn.it (errno=9)
Error in TWebFile::GetFromWeb10: cannot connect to host nusrv9.na.infn.it

Therefore, I assume BasicAuth does not work. What can be done then?
I have found some threads in this forum describing this problem, but nowhere with a working answer.

Is there something I can do to access my ROOT file remotely?

Best regards,
Antonio

For “https”, you need any “standard” ROOT 6 distribution and if you still get problems then I think it is a problem of the www server (note: the “:” before “/path” is not really needed).
Make sure that you are able to access your file in a “standard” web browser (e.g. “firefox”), when you try https://nusrv9.na.infn.it/path/file.root (it should ask you for the “myusername” and “mypassword”).

Thank you for your answer,

unfortunately opening the link with firefox does not work (it shows firefox connection problem).

Just to make sure … you do understand that the “myusername” and “mypassword” that you use for “https” are (in principle / usually) NOT the same as you use for e.g. the standard “ssh” login.

I actually did not know that.

However, firefox does not ask me for a password at all. It just shows the error of failed connection.

Just to make sure … you do understand that using “https://” (or “http://”) means that you are accessing some web server (which needs to be running there).

Good morning,
I can connect to ELOG of nusrv9.na.infn.it:8080 (https://elog.psi.ch/elog/) from the computers connected to the same net, so I thought a web server was already active. But maybe ELOG works in a different way.

I will check, thank you very much for pointing this out.

Best regards,
Antonio