Solved

DD-WRT SSH PORT

Posted on 2010-11-27
9
972 Views
Last Modified: 2012-05-10
I made mistake I change ssh default port from 22 to 443.
I need to know how to change it back via ssh.
0
Comment
Question by:toroblanco2002
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
9 Comments
 
LVL 79

Expert Comment

by:arnold
ID: 34226537
ssh user@ipaddress -p 443
nvram set sshd_wanport=22 sshd_port=22

or run nvram show | grep 443 after your login and update the variables with SSHD in them.
0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34226656
It did not work I try both of the commands.
At least if i will know where the sshd_config file on my router is I will attempt to edit it. Thats really what I'm looking for.  I thought it on /etc/ssh/sshd_config but is not there. I was able to see it once but I did not pay attention on what directory.
0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34226706
I now that I notice one of the commands I'm not sure which one did change the remote port to 22. But I want to change the default por not the remote port. will changing the wanport =22 to localport=22 will do it?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 79

Expert Comment

by:arnold
ID: 34226735
run/executed after you login into the dd-wrt router with ssh
nvram show | grep -i ssh

what is being returned? with 443?
update that with nvram set sshd_port=22

The settings are set within the nvram versus having a /etc/ssh/sshd_config as is usually where the sshd config is on a linux.

0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34227267
Ok, after run nvram set sshd_port=22 what command should I run to save the changes?
0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34227341
I think this is going to work... I have one more question... do you know how can create a simple bash script to ping one of my computers every 10 min to check if is up and email me if the pc is down.
this is example of what if have some gave me this.

#!/bin/bash
ping -c 3 192.168.1.1
if [[ $? != 0 ]]; then
    date '+%m/%d - %H:%M : Connection Unavailable' >> /var/log/monitor.log
    mail -s "Server down, oh noes!" email@email.net < /var/log/monitor.log
else
    date '+%m/%d %H:%M : Connection Available' >> /var/log/monitor.log
fi

I'm new to all this I'm to learn so how can I put this script inside the router and make functional.

Thanks I will increase the points on this questions if is require to get this done, I will really appreciate your help.
0
 
LVL 79

Accepted Solution

by:
arnold earned 150 total points
ID: 34227553
Emailing components are not available within dd-wrt setup to make this possible.
you would need to add components to your install.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=16041

A good opensource monitoring network/data collection tool is nagios, openNMS, cacti.


nvram commit

saves/writes the changes that will survive a power cycle.
0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34227598
Thank you
0
 
LVL 3

Author Comment

by:toroblanco2002
ID: 34227607
Thank you I will check it out.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question