"You can't," Shastri told Michael Vaughan in an interview published in the Daily Telegraph, when asked about the plans once Dhoni, now 37, retires. "Such players only come once in 30 or 40 years. That is what I tell Indians - enjoy it while it lasts. When he goes, you will see a void that will be very hard to fill. I know there is Rishabh Pant, but to be an ambassador for the sport for so long is amazing."
Dhoni is the oldest player in the India squad and, for the past year or so, his position in the team has been hotly debated with the explosive finishes that made him one of the most feared limited-overs batsmen drying up.
The Indian team management, however, has continued to back Dhoni, and in the third ODI against Australia on Friday, the batsman repaid the faith with a second successive match-winning half-century to help clinch the series 2-1.
Dhoni is likely to travel to the World Cup in England and Wales later this year as India's first-choice wicketkeeper, and according to Shastri, his contribution from behind the wicket has been vital to the team's success. "That is because he has the best angle. He sees things. He is great with the guys, they all worship him. This entire team has been built by him because he was captain for ten years. To have that kind of respect in the dressing room and experience is massive," Shastri said.
Even when he isn't in the team, Dhoni remains ever-present, Shastri said, giving the example of Pant, who was in constant touch with the senior man during the preceding Test series in Australia.
"His [Pant] hero is MS. Every day he is on the phone to MS. I think during the Test series, he must have spoken more to MS than anyone else. It is great when you have that mutual respect. Virat Kohli and MS Dhoni, the respect they have for each other is unbelievable, so it makes my job in the dressing room so much easier."
Asked to describe his role as head coach, Shastri said he preferred tinkering with mindsets rather than techniques. "I am more into fine-tuning, mindsets, and how you play the game. Very rarely will I go and tinker with a player unless I think it is needed," he said. "Yes, I will bang him on the head if I think he is a p**** or afraid of something. That is when I am at my nastiest. Then I'm not a coach, I am something else.
"You have to be fearless if you want to play for this team. Fearless means trusting your instincts and clarity of thought. Once you have made up your mind, don't be scared of what if. You would rather get out testing your instincts than being in two minds."
Shastri had earlier served as team director between 2014 and 2016. He returned as head coach in 2017 and has been a part of some heady wins, none bigger than the recent Test series win in Australia - the first Asian team to achieve the feat in 71 years.
Shastri reiterated that for him, the triumph was bigger than India winning the World Cup in 1983, when he was one of the squad members. "Winning the World Cup in 1983 was big and also 1985, when we beat Pakistan in the final of the Benson & Hedges World Championship here in Melbourne. But this was the biggest I have been involved in because, for me, Test cricket is the purest format of the game. For 71 years, Asian teams have come here with great spinners and batsmen, and not won. So to do it after 71 years is something special."
As far as he is concerned, Shastri is clear about his target: build a successful unit of match-winners that will help India win overseas consistently.
"It is about making a team culture. When I took this job, I knew India had brilliant individual players. But how often when we have toured overseas have we looked like a team? You are not here to fill in your own numbers. You have to think how are we going to win this Test," Shastri said.
"Who are the guys we are going to back who will play in that fashion for their country? Who is going to be like Australians, who play hard for their country? Be prepared for the battle out there in the middle. My coaching is on those lines."