Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7942989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:08:26+00:00 2026-06-04T00:08:26+00:00

I am developing a library that uses SSHJ for SFTP transfer. Since requests are

  • 0

I am developing a library that uses SSHJ for SFTP transfer.
Since requests are frequent, I have wondered whether I could just keep the connection open.

Obviously, this will achieve nothing if the server frequently times out the connection.
Since I have no control of the server, I have to keep the connection alive:
With a regular SSH client, I could specify a ServerAliveInterval and have the client do it for me.

I’d like to do the same with SSHJ, but I do not know what message to send.

The SSH manual just states that ServerAliveInterval

Sets a timeout interval in seconds after which if no data has been received from the server, ssh(1) will send a message through the encrypted channel to request a response from the server.

So I’m wondering:
What message is sent? How could I reproduce this message through SSHJ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:08:28+00:00Added an answer on June 4, 2026 at 12:08 am

    Sorry this isn’t documented, but you can set a heartbeat:

    https://github.com/hierynomus/sshj/blob/master/examples/src/main/java/net/schmizz/sshj/examples/RemotePF.java#L51

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a library in C++ language that uses multithreading. Since I'm developing it
Hi I am developing a Qt application that uses a plugin (dynamic library) and
I am developing a library that uses one or more helper executable in the
I am developing a library and an application that uses the library in Python
I am developing a userspace premptive thread library(fibre) that uses context switching as the
I'm developing a small haskell program that uses an external static library I've developed
I'm developing an application that uses Managed WiFi . Normally I would just add
I have been developing a library that is getting pretty large, and now I
I have an application I am developing that uses both jar libraries and native
I am developing a library class that uses a serial port to communicate with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.