I'm using 2018-11-13-raspbian-stretch-full.img
My linux PC connects to Pi via a switch. I can ping Pi. but when I telnet to Pi, got
Trying 192.168.1.101...
telnet: connect to address 192.168.1.101: Connection refused
search on web, then I enabled SSH on Pi with rasp-config
reboot Pi,
still can't telnet. please give me some clue.
thanks
LXW
Re: telnet to Pi
Have you installed a telnetd on to your Pi? I don't think it installed by default since for most applications, people will use SSH.
SSH != Telnet.
What is your use case for using telnet rather than SSH?
SSH != Telnet.
What is your use case for using telnet rather than SSH?
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter
Pi Interests: Home Automation, IOT, Python and Tkinter
-
- Posts: 972
- Joined: Mon Apr 09, 2018 5:26 pm
- Location: N. Finland
Re: telnet to Pi
Try using the SSH client:
Unlike Telnet, the SSH connection is reasonably secure. However, it might be relevant to ask what you are trying to do? Do you have a specific activity that absolutly must have telnet and only telnet? Or are you just trying to connect?
Code: Select all
ssh -l pi 192.168.1.101
Re: telnet to Pi
Or
ssh pi@192.168.1.101
A couple of simple steps also allows you to securely log in without having to give a password.
ssh pi@192.168.1.101
A couple of simple steps also allows you to securely log in without having to give a password.
Re: telnet to Pi
thank you. I though telnet is using SSH. I used to use telnet for remote login to Pi. and it works. don't know why not work any more.
-
- Posts: 972
- Joined: Mon Apr 09, 2018 5:26 pm
- Location: N. Finland
Re: telnet to Pi
Telnet is not there any more so it won't work. Since 1995 or so, there has been SSH instead.
Once you are in you can follow the hint that jahboater has given above and use keys for authentication instead of passwords.
That would be because telnet is not safe. The user name, password, and all of the data to and from the machine are transfered in the clear, completely unencrypted. The SSH client encrypts everything, plus has a lot more capabilities.
Once you are in you can follow the hint that jahboater has given above and use keys for authentication instead of passwords.
Re: telnet to Pi
On your PC (not on the Pi) type ...
ssh-keygen -t rsa
accept the defaults for all the questions (hit <return> a few times). It probably defaults to rsa, so you may not need the -t option.
Then:
ssh-copy-id pi@192.168.1.101
will transfer the key to your pi (it will ask you for a password).
Then try ssh pi@192.168.1.101
and this time you should go straight in. This is called public/private key authentication and it is far more secure than giving a password - and quicker too.
You may also do
scp myfile pi@192.168.1.101:
and it will copy the file across to your home directory, again very quickly, with no annoying password request.
Finally, on your PC, put something like this in your ~/.bashrc
alias pi='ssh pi@192.168.1.101'
then you can just type pi to log into your Pi.
ssh-keygen -t rsa
accept the defaults for all the questions (hit <return> a few times). It probably defaults to rsa, so you may not need the -t option.
Then:
ssh-copy-id pi@192.168.1.101
will transfer the key to your pi (it will ask you for a password).
Then try ssh pi@192.168.1.101
and this time you should go straight in. This is called public/private key authentication and it is far more secure than giving a password - and quicker too.
You may also do
scp myfile pi@192.168.1.101:
and it will copy the file across to your home directory, again very quickly, with no annoying password request.
Finally, on your PC, put something like this in your ~/.bashrc
alias pi='ssh pi@192.168.1.101'
then you can just type pi to log into your Pi.
Re: telnet to Pi
thank you so much for further info. I'm so lack of linux stuff.