Again: You are using the incorrect user, incorrect passowrd, or incorrect host.
What do you have in /etc/asterisk/manager.conf ?
Are you sure you want to connect to 192.168.1.40 and not 127.0.0.1. How does the permit / deny lines look in asterisk's manager.conf ?