Class SshInfoServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class SshInfoServlet
    extends javax.servlet.http.HttpServlet
    Servlet hosting an SSH daemon on another port. During a standard HTTP GET request the servlet returns the hostname and port number back to the client in the form ${host} ${port}.

    Use a Git URL such as ssh://${email}@${host}:${port}/${path}, e.g. ssh://[email protected]@gerrit.com:8010/tools/gerrit.git to access the SSH daemon itself.

    Versions of Git before 1.5.3 may require setting the username and port properties in the user's ~/.ssh/config file, and using a host alias through a URL such as gerrit-alias:/tools/gerrit.git:

    
     Host gerrit-alias
      User [email protected]
      Hostname gerrit.com
      Port 8010
     
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doGet​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp)  
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
    • Method Detail

      • doGet

        protected void doGet​(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse rsp)
                      throws IOException
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        IOException