Run ssh server on my notebook through wireless conection
How to setup an ssh conection via wireless(to my notebok) which can be acessed from outside my internal coneciton? I have a d-link router and my isp don't blocks ssh. Could you plz tell me a step by step way to do it without having to pay?
|
The wireless doesn't matter. A network connection is a network connection.
When you say "accessed from outside my internal connection," I assume you mean "can be accessed from the internet." If my assumption is correct, here's one way that's not at all complicated: Get some sort of DNS service (I used to use noip.com and was quite satisfied with them) to ensure that your network is discoverable from the internet. Give the netbook a static ip address. Open the incoming ssh port in your router, then set up port forwarding in the router to forward external calls to port 22 to the netbook's ip address. When this is done, ssh calls coming to your router will be forwarded to the netbook. If you are going to make ssh accessible from the big wide world, you should look into using a non-standard ssh port. This link is about CentOS, but it's a good primer: http://wiki.centos.org/HowTos/Networ...ebce74da40d8ec |
OK I did it and I can't even acess my notebook internaly using the 192.168.0.102 ip. Look at the configuration file on my note:
Code:
Package generated configuration file This is how i've atributed the por fowarding: http://upimage.us/server/php/files/imagem6.png Provided that the output of ifconfig wlan0 on my notebook is: Code:
And this is how I did setup my static ip to the router: http://upimage.us/server/php/files/imagem72028129.png No look at that: Code:
Code:
Code:
ssh sshclient@*********** Another thing is that I'm able to ping my Lan connected desktop, but no able to ping my wlan notebook.It gives me "host unreachable" That might be a problem. If is needed me to translate something for you, don't be afraid to ask me, I really need your help! Is the first time I'm doing this so every kind of help is welcome. Things are bad here. Thanks! edit: One more thing if it helps: Code:
nmap -A -T4 -Pn ******** |
What distribution / version is running on the laptop?
Is the ssh server actually running? (one way to check is ps ax | grep sshd) Can you login using ssh on the laptop itself? (ssh sshclient@localhost) If a firewall is running does it allow ssh traffic? If all that works then it should be possible to login via another computer on your LAN. I expect ssh sshclient@192.168.0.1 to fail since I assume that 192.168.0.1 is your router's IP address. Once you can login on your LAN the we can try through the router. |
Using ubuntu 15.04, ssh is running I guess, at least the client is working.
Code:
Code:
sudo ufw allow ssh 192.168.0.1 is the ip of my router, And I can't login into my own laptop using itself. here's what happens: Code:
# ssh sshclient@192.168.0.102 |
ssh is not running. What happens when you run the command
sudo systemctl start ssh |
The first time I runned the comand as root, i didn't returned nothing. The second time I just get:
Code:
# systemctl start ssh Here are the systemctl and journalctl -xe: Code:
Code:
# journalctl -xe But I don't no how can it be since I can ensure you that the ssh client of the same notebook works perfectlly. |
Many commands do not return any status if completed successfully. The error appears to be caused by trying to start ssh again. Try starting it again only once then check its status.
|
Ok! I'll post here a sequence of terminal commands to answer everything you asked michaelk. All was done in the sequence that is putted:
Code:
root@matt-Vostro-5470:/home/matheus# ps ax | grep sshd |
Just for grins lets try to start sshd from the command line i.e.
/usr/sbin/sshd -D Post any error messages. The terminal will sort of look like it has hanged and you should not see a new command line prompt. In an new terminal window try logging in as ssh sshclient@localhost To stop ssh press ctrl-c (the terminal window that ssh is running should be selected first) |
here it is:
Code:
|
Your sshd_config file appears to have a syntax problem. Make sure it looks like the following.
Code:
# Logging |
That worked man! Now "sudo systemctl start ssh" doesn't reply any error. I think we have it now:
Code:
# ps ax | grep sshd Here's my config file now: Code:
# cat /etc/ssh/sshd_config Code:
# ssh sshclient@192.168.0.1 |
192.168.0.1 is the IP address or your router.
Use ssh sshclient@192.168.0.102 or ssh sshclient@localhost |
Quote:
I don't want to try dns server now since I want to do it setp by step, so how to check what is going wrong now? |
All times are GMT -5. The time now is 10:39 PM. |