Hi all LAN IP 192.168.1.200 WAN IP 212.159.x.x Router 192.168.1.254 I have installed Ubuntu 8.04 on a machine that I wish to open up to the internet to serve web pages, and I also wish to access this machine from my work machine using SSH. I have installed SSH on it and can access it using my laptop internally on my home network. All works fine. I have opened up port 22 on my router and a friend could connect to it from his machine, but we encountered a problem when trying to login. It asks for my username - I put in "username", it then asks for "[email protected]'s password" - whatever I put in it won't accept! I temporarily allowed root to login using SSH but this also failed as it appears to be adding on the FQDN to the username when trying to connect externally! How do I get around this? This is my first attempt at setting up a Linux server and don't want to be beaten! Sure it's something I haven't done, so feel free to call me stupid! Thanks in advance for any help. Colin
I think you are sshing to the router that is why you login fails even if u are using the correct password To ssh to your machine you need to port forward ssh from your router to your machine
Hi topdog Thanks for the reply. So is this something I need to do on my router, or do I need to do more configuration work on SSH? Thanks Colin
I've setup port 22 to be forwarded to 192.168.1.200 (Ubuntu PC I wish to access using SSH from an external IP address), but it is still asking for my username with the "@domain.co.uk" suffix attached.. Just to clarify, my friend can connect from his PC (externally to my network), it asks for username, then asks for "[email protected]" instead of just "user".. Confused, but sure I am missing something very simple here.. Thanks so far! Colin
Hi Falko Have re-checked the router settings and it is definitely setup to forward any port 22 traffic to IP address 192.168.1.200 (My Ubuntu PC I wish to remotely connect too..) I removed it and re-added it but still no luck. When I added this rule on the router, it informed me that it was moving the routers SSH port to 2222. The Ubuntu PC will be hosting a web domain (www.domain.co.uk for example) out to the internet - is there anything else I need to configure on the PC side? Regards Colin
Do you remember the exact message? You need to install Apache and possibly PHP, Python, Ruby (or whatever sccripting language you prefer), and maybe MySQL if you need databases. If you just want to host one web site, you can put it in /var/www, otherwise you need to configure virtual hosts.
This looks like normal behaviour for ssh. If I type: Code: ssh [email protected] Upon connecting, the sshd asks for my credentials thus: Code: [email protected]'s password: At which point I have to enter the correct password to proceed further. Try connecting like that and entering the password for the user. If it fails, sshd will respond: Code: Permission denied, please try again. [email protected]'s password: Then connect internally and look at the last few lines of /var/log/auth.log This is an example of a failed login attempt due to incorrect password. Code: myloginname@myhostname:~$ tail /var/log/auth.log Aug 5 20:53:04 myhost sshd[32097]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=###.###.###.### user=myloginname Aug 5 20:53:06 myhost sshd[32097]: Failed password for myloginname from ###.###.###.### port 51045 ssh2 myloginname@myhostname:~$ Difficult to say what error you may see though.
Well it is all working now, not sure why or what has changed though! Thanks for your help guys. Colin