VMware Cloud Community
fusionit
Enthusiast
Enthusiast

How to set the SSH timeout on ESXI 4.0

Does anyone know how to set the idle timeout for SSH sessions on ESXI 4.0? I know the 4.1 version now includes this option but upgrading is not a possibility at this time. I need to set the timeout value so my ssh sessions do not timeout during long file copies from one data store to another using cp command.

Thank you in advance.

0 Kudos
8 Replies
lamw
Community Manager
Community Manager

afaik, UserVars.TSMTimeOut is a new advanced parameter that was only introduced with vSphere 4.1 which controls the number of minutes before disabling TSM. I don't' believe this is an option pre 4.1, you could try and see if it works, perhaps it was made hidden an only exposed in 4.1

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware VCP3,4

VMware VCAP4-DCA

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
fusionit
Enthusiast
Enthusiast

I'm no linux guru, do you know how I might manually set this variable when it isn't exposed? I tried traditional linux methods like the sshd.conf file but that doesn't seem to exist in esxi.

0 Kudos
DSTAVERT
Immortal
Immortal

ESXi uses a very lightweight SSH server called Dropbear rather than OpenSSH. I believe it is OFF or ON. See what is available for dropbear or you can use William's post to see if it is possible to add this feature.






Forum Upgrade Notice - We will be upgrading VMware Communities systems between 10-12 December 2010. During this time, the system will be placed in READ-ONLY mode.

-- David -- VMware Communities Moderator
0 Kudos
lamw
Community Manager
Community Manager

This has nothing to do with SSH, the configuration is an advanced ESX host configuration, for more details take a look at this VMware KB - http://kb.vmware.com/kb/1017910

You can use the vSphere Client to do it or use Tech Support Mode. Though since this parameter was only introduced in vSphere 4.1, there's a good chance you won't see it in vSphere Client. You could try setting it using esxcfg-advcfg, again it's more of a long shot to see if it's a hidden param

Another approach to this, is you can setup a cronjob to just disable SSH at a certain time period. Maybe once a week or something if you're concerned about forgetting to disable it.

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware VCP3,4

VMware VCAP4-DCA

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
fusionit
Enthusiast
Enthusiast

I'm not worried about disabling it the problem I'm having is my ssh session is timing out and disconnecting during lengthy file copy operations

( I am ussing ssh to remotely connect to console of esxi server, using cp -R command to copy an entire VM from one datastore to another, the copy command could run as long as 10-15 hours) the copy operation ends prematurely because the ssh session times out)

I have used the browse datstore feature of the vsphere client and selected "Move a file from this datastore to another" option but it seems like that takes longer to perform the copy than the native console cp command does, by several hours

Any further suggestions or help are welcome.

0 Kudos
DSTAVERT
Immortal
Immortal

You can try changing the client keepalive setting. ServerAliveInterval in ssh_config

This setting is on the client side not ESXi.






Forum Upgrade Notice - We will be upgrading VMware Communities systems between 10-12 December 2010. During this time, the system will be placed in READ-ONLY mode.

-- David -- VMware Communities Moderator
0 Kudos
MrTovson
Contributor
Contributor

Did you happen to solve this issue?

0 Kudos
fusionit
Enthusiast
Enthusiast

I was never able to crrect this, however I did find that even though my sessions timed out typically the CP file copy fould conitune untill complete. ( I was using the datastore browser to track progress after SSH session timed out.  I would recommend if you have teh ability to do so upgrade to teh latest 4.1 which includes options for setting the timeout. 

0 Kudos