i need to execute remote commands through ssh in views,following is my
code:
@login_required
def reposCheck(request):
    if request.method == 'POST':
        from commands import getoutput
        rs = getoutput('ssh t...@192.168.1.2 "[ -d /home/shing3d/
shin/ ] && echo 1 || echo 0"')
        return HttpResponse(rs)
    return HttpResponse('ok')

the same command success execute in django shell,but got no response
from above code when the remote server have detected success login.
the http response code is 499.
can anyone tell me how to treat it?thx

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to