Re: ssh gives "Permission denied, please try again"
- From: Will Kemp <will@xxxxxxxxxxxxxxxx>
- Date: Thu, 17 Jul 2008 20:54:16 +0100
Anthony Campbell wrote:
On 2008-07-17, John Phillips <news0804@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:On 2008-07-17, Anthony Campbell <ac@xxxxxxxxxxxxxxxx> wrote:On 2008-07-17, Bernard Peek <bap@xxxxxxxxxx> wrote:You usually need to do two things to get SSH to pass through a router.In message <slrng7uvlt.tvp.ac@xxxxxxxxxxxxxxxxxxxxxxxx>, Anthony Campbell <ac@xxxxxxxxxxxxxxxx> writesI looked myself up and my static address seems to be 87.127.32.23. II thought the right host to connect to would be ac@xxxxxxxxxxxxxxxxIt would be possible to arrange that but it's a bit tricky and there are security implications for your network. If you decide that it's what you want to do then we can give you some more help. We would need to know whether you have a static or dynamic IP address from your ISP.
since that is what I use for emails etc. I can connect to
arcadia.acampbell.org.uk but that wouldn't work from a computer outside
my newtwork, or would it?
tried to ssh to that but it said port 22 was blocked. That seems to be
due to my router; I therefore tried to open ssh access in the router and
now ssh just hangs indefinitely. So that is progress of a sort but I'm
a bit worried about possible security issues, although it seems to be
possible to specify a particular WAN address.
I think you only did one of them.
1 allow port 22 traffic to pass through the firewall (I think you did this)
2 make sure incoming port 22 traffic is directed by the router to the
specific server machine. Assuming you use NAT this will be in the
server setup section of the NAT setup.
As far as security is concerned there are several things you can do with the sshd config file to harden usual sshd installs. If you do get an external connection I am sure someone will tell you.
OK, got it! Shorewall was blocking access. Turning this off temporarily
allowed the connection to come up.
Thanks to all for advice and help. I'll have to check up the security
aspect before setting it up permanently.
Well, the main issues can be dealt with by disabling password login in sshd_config and using RSA or DSA. That requires generating a public/private key pair (with ssh-keygen), putting the public key in ..ssh/authorized_keys and having the private key available on the machine you're connecting from (as someone else suggested, this could be on a flash stick or something).
If you're carrying a laptop and will be connecting from that, then it's simple. If you use windows or mac, putty can do ssh using the key. If it's linux, the keys go in .ssh/id_dsa and .ssh/id_dsa.pub (or id_rsa/id_rsa.pub).
You'll have to make the hole in shorewall permanent. And i'd recommend not using port 22 on the router - i.e., use a different port to ssh to and configure the router to forward that port to port 22 on the host. This doesn't increase security but it does prevent silly script kiddies from making a nuisance of themselves trying to crack your ssh security.
So long as you make sure the system with sshd running on it is fully up-to-date - and in particular that you're using the latest version of sshd - you should be about as safe as you can get.
There's one way to make it pretty much rock solid - and that's to restrict the IP addresses that are allowed to connect to the ssh port. If you know the address - or the subnet - that you'll be connecting from, you can enable access from that/those address/es and deny it to everything else. That's the only way to *really* make sure of security. The rest of the above stuff on its own is second best - but still reasonably safe.
--
http://MaldonIT.co.uk
.
- References:
- ssh gives "Permission denied, please try again"
- From: Anthony Campbell
- Re: ssh gives "Permission denied, please try again"
- From: Ian Rawlings
- Re: ssh gives "Permission denied, please try again"
- From: Anthony Campbell
- Re: ssh gives "Permission denied, please try again"
- From: Ian Rawlings
- Re: ssh gives "Permission denied, please try again"
- From: Anthony Campbell
- Re: ssh gives "Permission denied, please try again"
- From: Ian Rawlings
- Re: ssh gives "Permission denied, please try again"
- From: Anthony Campbell
- Re: ssh gives "Permission denied, please try again"
- From: Bernard Peek
- Re: ssh gives "Permission denied, please try again"
- From: Anthony Campbell
- Re: ssh gives "Permission denied, please try again"
- From: John Phillips
- Re: ssh gives "Permission denied, please try again"
- From: Anthony Campbell
- ssh gives "Permission denied, please try again"
- Prev by Date: Re: ssh gives "Permission denied, please try again"
- Next by Date: Re: ssh gives "Permission denied, please try again"
- Previous by thread: Re: ssh gives "Permission denied, please try again"
- Next by thread: Re: ssh gives "Permission denied, please try again"
- Index(es):
Relevant Pages
|