Solving SSH Frustration on Linux System

  • Thread starter Euclid
  • Start date
In summary: If your network is configured to allow ssh connections from your computer to other machines on the network, but not from other machines on the network to your computer, then you might need to adjust your firewall settings. If you are unable to connect to your computer from another machine on the network, then you might need to check your network connectivity.
  • #1
Euclid
214
0
I recently learned about accessing computers remotely using ssh. I have been having some fun with this connecting my mac with my gf's mac.
I tried doing to same thing with a machine I had running Windows XP, but there were some goofy firewall settings that I couldn't get rid of for the life of me. So I installed Debian on the machine instead. I am completely new to Linux. I had a feeling that this might be easier with Linux than Windows, but I still can't make an ssh connection to my computer (both directions mac to Debian and Debian to mac don't work).
I am not sure what the problem is since I can connect my macs together without any trouble. Any ideas? Are there some settings I need to change on my Linux machine to make it accept ssh connections? I have a feeling this whole process is sensitive to how my machines are connected to the network. For instance, when both the macs are connected to the same university wireless network, I can connect. If I am connected through a router and the other mac is connected to the university wireless, I can't. If we are both connected through the same router, we can connect. My PC doesn't have a wireless card, so it connects directly to the wall.
Any help would be greatly appreciated!
 
Computer science news on Phys.org
  • #2
in linux type as root user

/etc/init.d/sshd start

On debian root might be dissabled and you will have to do the following equivilant

sudo /etc/init.d/sshd start
[enter password]

then try connecting. If that doesn't exist use your package manager and install OpenSSH server.
 
  • #3
I didn't have sshd installed. I installed it and I was able to connect. The new problem is I can't seem to load any files. I get an error message about loading the graphics, something about X11, maybe something having to do with "port forwarding". I would give you the exact error message but I can't seem to get in anymore. When I try to start sshd, it tells me it can't load the host key /etc/ssh/ssh_host_key_rsa. BTW, my sshd file seems to be located in /usr/sbin. Also when I give the command /usr/sbin/sshd start, it tells me there are too many arguments. Don't know what that's all about. Any ideas?
Out of curiosity, is "starting sshd" equivalent to "opening port 22"?
 
Last edited:
  • #4
don't do ("usr/sbin/sshd start") that alway's start sshd by

/etc/init.d/sshd {start | stop | restart }

it will take care of the key's and all that for you

what you are looking for is X11 tunelling try

ssh -Y login@place
the -Y should do the trick but maby you should use another text editor such as vim, or emacs. if the network is slow you might want to download the files to your local computer and edit them like that and then send them back over the network.

In the latter case you can use gftp which will connect through ssh and allow you to transfer files fairly easily using its GUI, where then you can edit and send them back.
 
  • #5
In general, when somebody says "open port 22" they mean allow traffic on that port in a firewall. sshd is a piece of software which runs in the background handling ssh connections to port 22 which is the port ssh utilizes.
 

1. What is SSH and why is it important on a Linux system?

SSH stands for Secure Shell and it is a network protocol that allows secure remote access to a computer or server. It is important on a Linux system because it provides a secure way to access and manage the system remotely, which is essential for system administration and troubleshooting.

2. What are the common reasons for SSH frustration on a Linux system?

The most common reasons for SSH frustration on a Linux system include incorrect login credentials, firewall blocking the SSH port, network connectivity issues, and incorrect SSH configurations.

3. How can I troubleshoot SSH connection issues on a Linux system?

To troubleshoot SSH connection issues on a Linux system, you can start by checking the SSH configuration file for any errors, ensuring that the SSH port is open on the firewall, and verifying the network connectivity between the client and server. You can also try restarting the SSH service and checking the system logs for any relevant error messages.

4. How can I improve the security of SSH on my Linux system?

To improve the security of SSH on a Linux system, you can implement measures such as disabling root login, using key-based authentication instead of passwords, and restricting SSH access to specific IP addresses. It is also recommended to regularly update the SSH software to patch any security vulnerabilities.

5. Are there any alternative solutions to SSH for remote access on a Linux system?

Yes, there are alternative solutions such as Telnet, FTP, and VNC that can be used for remote access on a Linux system. However, these protocols are not as secure as SSH and may pose a higher risk of unauthorized access. It is recommended to use SSH for secure remote access on a Linux system.

Similar threads

  • Computing and Technology
Replies
5
Views
1K
  • Computing and Technology
2
Replies
43
Views
3K
  • Computing and Technology
Replies
12
Views
2K
  • Computing and Technology
Replies
4
Views
2K
  • Computing and Technology
Replies
25
Views
1K
  • Computing and Technology
Replies
27
Views
2K
  • Computing and Technology
Replies
1
Views
1K
  • Programming and Computer Science
Replies
1
Views
469
  • Computing and Technology
Replies
1
Views
4K
  • Computing and Technology
Replies
2
Views
1K
Back
Top