Find the answer to your Linux question:
Results 1 to 7 of 7
Hi , i am trying to run ulimit command on a remote system using SSH, but i am not able to set ulimit on the remote system .... i.e ssh ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    9

    Question ulimit using SSH


    Hi ,

    i am trying to run ulimit command on a remote system using SSH, but i am not able to set ulimit on the remote system ....
    i.e
    ssh -n root@remoteip "ulimit -c 1024"

    Can any one help me in this issue....

    thanks,
    praveen.

  2. #2
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Are you trying to limit the corefile size? Anyway ulimit is a bash builtin command. This applies if the default shell is bash. Try logging in interactively and checking your SHELL variable
    Code:
    ssh remoteip -l root
    echo $SHELL

  3. #3
    Just Joined!
    Join Date
    Jun 2008
    Posts
    9

    ulimit using ssh

    [
    i want just to check whether ulimit works or not .i have checked using
    ssh remoteip -l root "ulimit;echo $SHELL"
    root@remoteip's password:
    unlimited
    /bin/bash

    but at remoteip the ulimit is set to "0", but it is showing unlimited..

    actually is there any file does ulimit uses or updates if ulimit options (-H,-S,-c etc..) changes..

    thanks,
    praveen

  4. #4
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Not that I'm aware of. It's generally used as part of a .bashrc or in /etc/profile so that bash itself reads in the option when the shell starts.

  5. #5
    Just Joined!
    Join Date
    Jun 2008
    Posts
    9

    Question ulimit using ssh

    ok then wts the solution for this problem

    which file i need to change so that i can set ulimit via ssh

    i tried to change /etc/limits file (But it is wothless)

    i tried to change /etc/profile file (But what happens is that, while trying to get the ulimit vi ssh. it is showing the ulimit value in /etc/profile. But not the ulimit of the remote system)

  6. #6
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    I'm not quite sure. I'll have a bit of a play later on with it when I get home and see if I can figure anything out. Meanwhile if anyone else has any ideas...

  7. #7
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Quote Originally Posted by praveen455 View Post
    i tried to change /etc/profile file (But what happens is that, while trying to get the ulimit vi ssh. it is showing the ulimit value in /etc/profile. But not the ulimit of the remote system)
    Where did you change /etc/profile? On your own machine or on the remote machine?

    The remote machine would not read the value of your client, it reads its own /etc/profile. If this is applying ulimit values correctly, isn't that the solution?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •